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. Built-In Search Bar Widget??

I am building an application that will allow users to query a database
via a search bar, and have been looking to see if there is a cleaner
way to do this besides just an EditText view and a Button next to each
other. (had something along the lines of the iPhone's search bar in
mind)

If not, then I'll just keep trying things until I find something I
like.

Appreciate any responses.


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

2. Testing Tips

Hi All,

am new to android platform, and would like to know how to test the
android porting with the BSP. request your help in testing the
android.

Thanks in advance.

-Sri

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

3. how to achieve HTTPS client authentication

4. How to Send SMS in Android

5. load image from the web?

6. 'Take a picture' intent on 1.5 - anybody please? ;)

7. Activity is unable to start service in same package