android - how to call a service from an activity? -
I have a service that
intents dialogue = getBaseContext An activity starts by (), Dialog.class); DialogIntent.addFlags (Intent.FLAG_ACTIVITY_NEW_TASK); . GetApplication () startActivity (dialogIntent); But I'm not sure when this new activity ends up for service, how to pass the call? Note that "startActivityForResult" does not work from one service;)
Edit:
Edit: < / P>
Edit:
>
Activity terminated
Intent dialogue = new intent (getBaseContext (), total keyboardboard.); DialogIntent.addFlags (Intent.FLAG_ACTIVITY_NEW_TASK); . GetApplication () startActivity (dialogIntent); End(); So far, in service, do not get calls
Public zero start at @Override (intent int, int startid) {Toast.makeText (GetApplicationContext) (), "AA!", Toast. LNNGHHORT). Show (); }
When you try to start the service The is already running then it does not call the onCreate method, but it calls the onStart () methods ... ... You can use it to fulfill your need for the property ...
Comments
Post a Comment