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

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. Phone Listner API in Android?

Is  there any API which can listen to the phone states in Android?

I mean when a call is initiated, connected, answeres or disconnected.


2. problems calling Hessian service with HTTP post

I'm trying to connect to a Spring Hessian service.  I get this error:
" Does not support output" when calling
c.getOutputStream().  Should I be using some other HTTP API for this?
Is there any better way to do remote procedure calls with Android?
Thanks for any help!

private String getHello() throws IOException {

                URL url= new 

                HttpURLConnection c = (HttpURLConnection) url.openConnection();
                OutputStream os = c.getOutputStream();
                MicroHessianOutput out = new MicroHessianOutput(os);



                InputStream is = c.getInputStream();

                MicroHessianInput in = new MicroHessianInput(is);
                String value = in.readString();
                return value;

09-29 15:26:22.332: WARN/System.err(231):
Does not support output
09-29 15:26:22.412: WARN/System.err(231):     at
09-29 15:26:22.433: WARN/System.err(231):     at
09-29 15:26:22.453: WARN/System.err(231):     at
09-29 15:26:22.463: WARN/System.err(231):     at
09-29 15:26:22.482: WARN/System.err(231):     at
09-29 15:26:22.493: WARN/System.err(231):     at
09-29 15:26:22.514: WARN/System.err(231):     at$1800(
09-29 15:26:22.522: WARN/System.err(231):     at$H.handleMessage(
09-29 15:26:22.532: WARN/System.err(231):     at
09-29 15:26:22.542: WARN/System.err(231):     at
09-29 15:26:22.542: WARN/System.err(231):     at
09-29 15:26:22.553: WARN/System.err(231):     at
java.lang.reflect.Method.invokeNative(Native Method)
09-29 15:26:22.562: WARN/System.err(231):     at
09-29 15:26:22.573: WARN/System.err(231):     at
09-29 15:26:22.583: WARN/System.err(231):     at
09-29 15:26:22.593: WARN/System.err(231):     at
dalvik.system.NativeStart.main(Native Method)


3. android classloader won't find my classes

4. WikiNotes & WikiNotes Articles

5. Intermediate server Problem

6. GeoLocation using cellId/Lac

7. one line EditText