Android :: How To Start A Remote Service In Android That Is Implemented In Another App - Different Package
Jun 19, 2010
i'm a bit stuck with remote services in android. thing is i implemented a remote service in package "a.b.c" and i want other applications to be able to access this service. i got rid of the whole crappy aidl-stuff and designed the "interface" of the service to work via broadcasted intents. works fine so far...
problem is: how do i get a different application (different package, different project, maybe even a different developer, ...) to start/stop the service?
CODE:..........
This will crash my app immediately on startup. what did i do wrong? how will i get this to work?
once it's running, commands and data will be passed via broadcasts. so that should be no real problem...
View 1 Replies
Apr 25, 2010
I have two apps, one runs in namespace com.gtosoft.voyager and the other is com.gtosoft.dash. From com.gtosoft.dash I would like to start up the service which is defined in com.gtosoft.voyager...
I think I need an intent, but what arg(s) would I pass to the intent before kicking it off with startService()?
If they were in the same package I could just use
CODE:............................
View 1 Replies
View Related
Jun 9, 2009
I have a service class my.app.MyService that I'm attempting to launch from my.app.MyActivity as follows:
Intent svc = new Intent( this, MyService.class );
The manifest contains the entries:
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_SERVICE" />
<service android:name =".MyService" />
LogCat gives the message:
"Unable to start service Intent { comp={"my.app/ my.app.MyService" } } : not found"
Could someone kindly let me know what I am missing?
View 3 Replies
View Related
Nov 9, 2010
I'm confused about whether I need to run my service in a separate process. What are the advantages / disadvantages of each?For reference I'm trying to create an App that uses a service to play [streaming] audio in the background. So which one is better for my use case?
View 1 Replies
View Related
Sep 30, 2009
i have an app that binds to a local service.I want to add a desktop widget that binds to the same service. does my service have to be a remote service or can it still be local?if it can still be local, how can I get at the local binder?
View 2 Replies
View Related
Jan 25, 2009
My application has 2 packages because one is shared with my other applications. I want to start an activity of the shared package.
I tried the following: Intent intent = new Intent(); intent.setClassName(shardedPackageName,sharedActivityName); startActivity(intent);
It throws an ActivityNotFoundException and suggests that the activity might not be in the manifest. But how do I list an acitivity from another package in the manifest?
View 5 Replies
View Related
May 28, 2010
I'm developing a GPS tracking software on android. I need IPC to control the service from different activities. So I decide to develop a remote service with AIDL.This wasn't a big problem but now it's always running into the methods of the interface and not into those of my service class. Maybe someone could help me?If i now try to call a method from an activity for example start(trackId) nothing happens. The binding is OK. When debugging it always runs into the startTracking() in the generated ITrackingServiceRemote.java file and not into my TrackingService class. Where is the problem? I can't find anything wrong.
View 1 Replies
View Related
Aug 20, 2009
I am getting following message when i try to launch service.Also is there any specific path on file system where we need to place the .apk file which contains my serivce component only.
View 2 Replies
View Related
Feb 15, 2010
I'm looking for an app to turn on your phone from a computer or other remote location does such an app exist?
View 10 Replies
View Related
May 6, 2010
I know how to update my own programs, and I know how to open programs using the a predefined Uri (for sms or email for example)
I need to know how I can create an Intent to open MyTracks or any other application that I don't know what intents they listen to.
I got this info from DDMS, but I havn't been succesful in turning this to an Intent I can use. This is taken from when opening MyTracks manually.
CODE:..................
View 2 Replies
View Related
Aug 6, 2010
Can someone tell me how to start new application knowing only its package name? I do not have information about what activity is the main one.
View 1 Replies
View Related
Jul 9, 2010
I have created a service that works great, it is launched from an activity at the moment. I'm looking to package it into a .jar file so that other people can add the jar to then their projects and then run the service. Can anyone tell me how I can launch this service from the app that it is included in?
View 3 Replies
View Related
Jul 8, 2010
I am writing a service that will be compiled into a .jar file for use in other apps. is there any way to get the name of the package that uses or launches the service?
View 2 Replies
View Related
Nov 22, 2010
I am trying to access a service in other package, but not able to get the binder.code...
In the ExampleActivity i am accessing the service by doing
but onServiceConnected( ) is not getting called, so i am not able to get the binder. But process everything is going fine , in the Eclipse console i am able
I tried with serComponent( ) & serClassName( ) as well, but for both the cases onServiceConnected( ) is not getting called. I googled and used the hint for listening boot completed and user present intents and starting the service in the broadcast receiver.
how can i access the service of other package (process).
View 2 Replies
View Related
Sep 24, 2009
I've implemented remote service using aidl & it is working fine if I'm using its service from same package. But If I tried to use the service from other application it gives me error
As below:
CODE:...................
View 3 Replies
View Related
Sep 22, 2009
I am studying RemoteService example in Android's APISample. In the manifest file, it declares the service like this: My question is how can I specify the service to be 'auto-start', i.e. it gets start whenever the phone start?
<service android:name=".app.RemoteService" android:process=":remote" >
<intent-filter>
<!-- These are the interfaces supported by the service, which
you can bind to. -->
<action
android:name="com.example.android.apis.app.IRemoteService" />
View 1 Replies
View Related
Aug 11, 2010
I have implemented a RemoteService which will increment a countere ( just for testing purposes ). Therefore I have a Task class which implements Runnable and the method run() where a infinite while loop increments the variable.
From the client side, I start the RemoteService with startService and then i bind to the service. When I close the activity, the service is still running. Now i want to rebind to the service.
How do I know if the service has already been started (therefore i would only need to bind to the service again) or not (then I would need to call startService() first and then bind to the service)?
What would happen, if I call startService() if the service is already running? Does the OS start a second service, or will it affect the service which is already running?
View 5 Replies
View Related
Jul 28, 2010
I have a service MyService.java in Application "ServiceDemo". The manifest of this application looks like this
CODE:.............
I have another application "CallerService" manifest looks like this
CODE:................
I have an activity from where I m trying to start the service on the click of the button
CODE:................
This fails to work. Says "unable to start service intent"
View 1 Replies
View Related
Oct 8, 2010
My initial activity is basically a splash screen while preforming initialization and login in to network server. To save memory I want to finish() the splash activity once it starts the main menu activity. I still want the remote service to operate. Testing shows it does. But am I going to get into trouble doing this? I know I can restart the remote from the main menu activity but I am trying to save overhead by not starting it twice. The remote service is required by the splash activity.
View 1 Replies
View Related
Apr 30, 2010
I defined a remote service over a AIDL file. Now i want to access this service in a different application. But how can I do that? The AIDL file is not accessible in my second application, and if i just copy the AIDL file, then the service can't be found.
View 1 Replies
View Related
Jan 20, 2010
I'm hoping to do some audio processing in a remote service (service I've spawned onto its own thread); this will basically occur in a while (1) loop so constant processing. Occasionally I want to provide some information back to the activity that is bound to the service; I'm doing this by sending a broadcast from the service, that is received by a broadcast receiver on the activity, which then uses the activity's service connection to call into the service and get the information needed; at this point the broadcast receiver makes an alert dialog presenting the information to the user.If I stay in my while(1) loop after raising the broadcast, the action in the broadcast receiver never seems to occur.This is confusing to me since the activity and service are in separate threads.If I end the loop after raising the broadcast, the desired behavior on the activity side occurs, but of course this isn't acceptable since I need to be doing constant processing.
View 11 Replies
View Related
May 18, 2010
Since yesterday I got an idea running around my mind but I donīt know first if it would work, and then how "hack" it would be.
People who develop audio processing/recording/playback apps for Android know how hard it is to maintain GC away from our critical paths: playing and recording audio. Processing must be as optimized as possible not only to save battery and use less CPU, but also not to create new objects/allocate new memory spaces ... this all to avoid GC at all cost. Well, we have knowledge and this we can handle (mostly). But what about all the other processing that happens from and for user interaction? Media players display images, some apps display ads, ... and sometimes we have to avoid releasing features to the users just to maintain our critical paths free from GC.
Yesterday I stumbled upon an article about remote services and this led me to a doubt: if they can run as a different process, would a GC call from my activity impact the performance of my remote service? I really donīt know how GC works on the Dalvik so this may be a dumb question. If so, I apologize.
You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
View 4 Replies
View Related
May 6, 2010
Can any one provide sample Remote service example. I want it like two different application. One application should contain service. Another application should use that service.
Thanks in adv....
View 1 Replies
View Related
Nov 23, 2009
I am binding a remote service from an activity and unbind the same on the onPause of the Activity,when the activity again restarts i bind the service .It does bind with the remote service and i am also successful in getting the remote-service method getting executed after the restart.But when returning a message from the callback-RemoteCallbackList.the mCallbacks.beginBroadcast returns me 0 clients.Am i missing some thing here ?why am i am getting zero clients when I call mCallbacks.beginBroadcast.?
CODE:....................
View 2 Replies
View Related
Apr 21, 2010
"Service" by it's defenision meaning the same as "Remote service" in Android? and if not, what is the diffrence between them?
View 1 Replies
View Related
Aug 15, 2009
Is there a way to step through code in a remote service? What I do now is install the service, then run the app that starts it and use trace output. Is there a way to perhaps automatically start the service upon installation, and have it stop at break points? Or is there another method?
View 2 Replies
View Related
Apr 29, 2010
Iam trying to run an activity from diffrent package from my remote service:
This is how i implement the service.java
CODE:....
Ive also added a line in the manifest of the service:
The service works fine, but i cant run the activity -> PushActivity which is in diffrent package of diffrent application, this is the error:
Activity not found Exception: No Activity found to handle Intent {act=com.pushservice.PushServiceActivity flq=0x10
View 2 Replies
View Related
Apr 28, 2010
I like to do some long running initializing work in a remote service, and during that, a progress dialog shall be shown. So basicly, I invoke ProgressDialog.show, run a oneway method of the service with a callback to be invoked when it's finished, and in the callback dismiss the dialog. I expected the service method to work in it's own process while the activity shows the progress dialog. But what happens instead (according to debugger and logs) is: ProgressDialog.show and service method invocation return immediately, then the service method is processed, and finally the progress dialog is shown for a few milliseconds right before it's dismissed. Even a "not responding" error might occur during that. If I invoke the service method in an own thread, which (as it's to be expected) is finished long before the service method is done, everything works fine. But I don't get why this is necessary. Why does a remote service method block the Activity thread? This even happens if the service method only does a Handler.post and returns immediately.
Simplyfied code overview: Activity: public void onStart() { startService(...); bindService(...);}
View 2 Replies
View Related
Sep 5, 2010
I have coded this service, that computes stuff and i want other applications to be able to bind this service, i.e. i want to enable other programmers to communicate with this service. problem is, this has to work without these other programmers to get access to the source code. just the (installed) apk with the remote service is given (and of course a detailed description of the service' interface)...problem is, eclipse keeps braggin' about that the packages of the service are not available in source code...
View 1 Replies
View Related
May 16, 2009
I didn't find a sufficient answer to my problem in any posts, if there already is one, please excuse and point me to it, thanks. I made 2 projects. project 1 hast an activity that binds to a service from project 2 on a button click (all just for testing).
How can I make project 1 know (import) my TestInterface (from TestInterface.aidl out of project 2) for usage in: "TestInterface mService = (TestInterface) TestInterface.Stub.asInterface(service);"
without adding project 2 to the build path, because if I'd have an installed service without the project code, I couldn't do it this way, too...?? I read in one thread that TestInterface.aidl should just be added to project 1, too, but if I do this, in DDMS enforceInterface() complains and seems to just see/use the interface from project 1 and it doesn't work.
2. issue:...............
View 9 Replies
View Related