Understanding issue with RemoteService example in Android ApiDemos

by Android » Wed, 11 Feb 2009 21:30:09 GMT

Sponsored Links
 Hi ,

I have few understanding issues regarding the Remote service, could
you plz help me out.

I have gone through the RemoteService example in Android ApiDemos, but
i am not getting which file to run for Client site and which one at
Server site.

These are the list of files used for RemoteService


As per my knowledge the Server .APK should use the RemoteService.java,
IRemoteService.aidl ,IRemoteServiceCallback.aidl, ISecondary.aidl.

Client .APK shoud use RemoteServiceBinding.java,
IRemoteService.aidl ,IRemoteServiceCallback.aidl, ISecondary.aidl. Not
sure whether my understanding is correct, plz suggest.

I am not getting exactly the flow to start the Remote Service, i mean
how to start the Client APK and Server APK. Is it first i have to run
the Server APK and then will start the Client APK. The AIDL would be
used to communicate between the Client and Server, but i didn't able
to get where exactly the Client triggers to start the service in
Server site.

Could you please provide a detail explanation to proceed, that would
be really helpful for me.


Other Threads

1. what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception

Mark, thank you so much for the pointer and information!!

you are right on the tabs and activity. the view hierarchy depth of my
activity is only 6 but, because the activity is 'hosted' by another
TabActivity, the total depth on StackOverflowError exception is 13

what i don't understand is:

1). is the critical point measured by the depth of hierarchy or by the
total memory size used by all the views on the hierarchy?

2). how does setBackgroundResource() increase the depth or memory
usage of 'the stack'?

thanks again!!


2. Bluetooth connect not working

I am trying to establish a connection to another Bluetooth device on
my Nexus One (2.1) with the following code, which occurs when on the
broadcast receiver when a device is found.

BluetoothDevice device = (BluetoothDevice)
BluetoothSocket btSocket = null;

    btSocket = device.createRfcommSocketToServiceRecord(MY_UUID);
    BluetoothClass btClass = device.getBluetoothClass();
    Log.d("BLUETOOTH", "------ createRfcommSocketToServiceRecord
WORKED: " + btClass.toString());
    Log.e("BLUETOOTH", "ON RESUME: BT connection established, data
transfer link");
catch (IOException e)
    Log.e("BLUETOOTH", "IOException: " + e);

I have tried both the following UUIDs for both the SPP and OOP

private static final UUID MY_UUID =
private static final UUID MY_UUID =

Every time I call the connect command I get an IOException with
"Service discovery failed". I have tried connecting to a G1, iPhone
and a Nokia phone all with the same results.

What am I doing wrong?


3. FW: FormatDateTime

4. Bluetooth A2DP/AVRCP profiles on Android

5. Any built-in intent for viewing a single image?

6. what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception

7. what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception