Can a native application use java methods in TelephonyManager using getSystemService()

by Roman ( T-Mobile USA) » Fri, 18 Sep 2009 05:02:51 GMT


Sponsored Links
 JNI is bi-directional. You can alsoo call Java methods from native
code.

I haven't tried this on the Android platform but I assume that it
works fine.


--
Roman Baumgaertner
Sr. SW Engineer-OSDC
T  Mobile stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Switching between normal view and glsurfaceview (game loading screen)

Hi all,

I'm trying to find the best way to implement a "loading screen" when
using a GLSurfaceView.

Basically the situation is this:

The app (game) loads a bunch of textures into VRAM when the GL surface
is created (onSurfaceCreated), however these textures are only for the
current "level" of the game.  When the player reaches the end of the
level I need to remove these textures from VRAM and load the new ones.

Previously (during development) each level was a complete load/unload
of the Activity, which works fine, however this creates a bunch of
unnecessary overhead as I don't need to reload the world for a simple
level progression.  So I have been experimenting with different ways
to overlay a standard view (which is my "loading" screen) over the top
of the GLSurfaceView while the level data is loaded.

This has created some problems for me:

1. Because the GLSurfaceView is not actually destroyed, the
onSurfaceCreated call is only made once and hence the opportunity to
load textures is gone.  To overcome this, I have introduced a flag
into the Renderer thread which will load up the textures in the first
call to onDrawFrame after the level is loaded.  I don't particularly
like this, but can't seen any other solution.

2. I don't seem to be able to find a way to effectively "switch views"
in my Activity.  I initially set the view (setContentView(...)) to the
loading screen (i.e NOT the GLSurfaceView), then the actual level load
is done asynchronously and when complete calls back to the main
activity thread which then performs a second call to setContentView()
with the GLSurfaceView instance.  This works the first time, but
thereafter I can't seem to get the loading view to become visible.  If
I use setVisibility(View.VISIBLE) on the loading view it doesn't
display, and if I perform a further call to setContentView() my
GLSurfaceView never comes back... that is, after subsequently calling
setContentView with the GLSurfaceView I get nothing displayed... no
errors, but my loading screen basically never disappears.

So.. does anyone out there have a good approach to solving this?  That
is, how to best implement a loading screen to "hide" the process of
bootstrapping opengl resources etc.

Thanks!

-- 

2. Best way to override values in frameworks/base/core/res/res/values/config.xml ?

Hi,
I want to override values in frameworks/base/core/res/res/values/
config.xml based on the target product.
What is the best method to override only selected values from them ?
I do not want to directly change the xml files do avoid conflicts with
other targets and to avoid maintenance issues.


Thanks,
-Naseer

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Simple question on saving to a file on sd card (android-beginners isn't working)

4. How force application(game) change multimedia volume not ringtone one

5. mp3 files <=0.34 secs not playing on Droid X using MediaPlayer

6. Creating Default Files

7. How to test Apps on a variety of devices?