Service provider / client

by Beowulf » Tue, 26 Oct 2010 01:54:40 GMT


Sponsored Links
 Greetings
   I am creating a service client and the following lines give me
error.  I was wondering how to fix these...
//  I have put in the service client stuff below...
                private  CheckZone mBoundService;
                private ServiceConnection mConnection = new ServiceConnection() 
{
                    public void onServiceConnected(ComponentName CheckZone, 
IBinder
service) {
                        // This is called when the connection with the service 
has
been
                        // established, giving us the service object we can use 
to
                        // interact with the service.  Because we have bound to 
a
explicit
                        // service that we know is running in our own process, 
we
can
                        // cast its IBinder to a concrete class and directly 
access
it.
                        mBoundService =
((CheckZone.LocalBinder)service).getService();

                        //This line complians about binding, and states that it 
can
not be resolved.  How do I fix this please?
                        Toast.makeText(binding.this, "Connected to CheckZone",
                                Toast.LENGTH_SHORT).show();
                    }


--



Service provider / client

by Miguel Morales » Tue, 26 Oct 2010 02:00:34 GMT


 Sounds like your variable 'binding' is undeclared.  Simply declare it
on your class like binding = this or simply use this.



>


Sponsored Links


Other Threads

1. android-framework [Split the Android screen into two parts and run 2 applications simultaneously on both screen]

maybe you can refer to IMF?



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

2. run simulator innormally & build project error on eclipse

As mentioned elsewhere, the simulator doesn't work all that well. Is
there a particular reason you're trying to use the simulator instead
of the emulator?


On Tue, Feb 24, 2009 at 6:31 PM, royzha...@gmail.com



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

3. Single choice dialog item selection

4. file transfer using usb to windows pc from android kernel

5. How can I launch the built-in picture viewer app from my app?

6. Gesture detection using touchscreen and accelerometer

7. How can i access one activity from another in the same package?