Android :: Application Using Service In Different Project?
Sep 1, 2009
I want create a service and that other application use this service. I want that the other application is in a different project that the service.
It is possible? If is possible somebody can show me a sample code.
View 6 Replies
Aug 8, 2010
I followed the instructions here on how to create an Android library project, and use it in an Android application:
http://developer.android.com/guide/developing/eclipse-adt.html
But it is not working. I can see the library project is added to my application but I cannot reference anything in it because it won't build. The R.java file from the lib is NOT being added to my application project, so the lib project contains tons of errors, everywhere it tries to reference it's own R.java file.
I don't know if this has anything to do with it, but in the console there are messages stating that the there is "No resource identifier found for attribute 'X' in package 'Lib Package'. My library package has a a few styleable attributes defined for a custom view I made, all of which are being complained about in this console message. The library builds just fine, and I don't get those messages in the console until I hook the library to my application, so I don't know what's up with this.
View 1 Replies
View Related
Aug 4, 2010
How do I start a project wherein I can design an application which fetches weather forecasts from existing web sites?
View 1 Replies
View Related
Feb 12, 2009
I am getting the below error when ever i am trying to call the bind service. 02-12 20:17:25.486: WARN/ActivityManager(58): Unable to start service Intent { action=oem.android.proj2.IRemoteService }: not found
I have created the Client-Server application. At the Server site i have used the AIDL to impliment the interfaces in my Service class. At Client site i have exposed the AIDL interfaces and have one Activity that mainly do the IPC mechanism , i mean ServiceConnection, bindService and then call the Serivce of the Client site. But i am getting the error i mentioned during the bindService call.
Could you please let me know the steps mainly i have to follow to run the Client -Server Application. For time being i am running the Client .apk first and then the Server .apk, but the server one giving me error.
It would be great if you could let me know what all permission short of thing to take care, as my Client and Server code are placed at different APks, so do i need to import the Client project in my Server Project, if yes then how to impliment that.
View 1 Replies
View Related
Aug 7, 2010
I've been trying to do this now for 2 whole days, and am about to give up. I followed the instructions here:
http://developer.android.com/guide/developing/eclipse-adt.html
but it is not working. I can see the library project is added to my application but I cannot reference anything in it. Also the R.java file from the lib was NOT added to my application, so the lib project contains tons of errors, everywhere it tries to reference it's own R.java file (most likely the cause of the former).
Also, in the console there are messages stating that the there is "No resource identifier found for attribute 'X' in package 'Lib Package'. The library builds just fine, and I don't get those messages in the console until I hook the library to my application.
You would think that creating and referencing a library would be a simple thing to do, as it is in most other projects, but this is turning into a real nightmare.
View 2 Replies
View Related
Jun 18, 2010
I'm trying to set up an Android application with an Android library project dependence in Eclipse. I've set up a project called AnTest and a library project called AnLib. I've provided a reference to AnLib in the project properties of AnTest. Now I'm trying to refer to some library code (a static public method) from AnTest. Eclipse throws "com.anlib.Hello cannot be resolved to a type".
And it's not that the reference is dangling - I can see the resources properly merged. But from within AnTest, the only class in package com.anlib is "R".I've added AnLib to the Java build path/Projects in AnTest project properties. Now it compiles, but running throws a NoClassDefFoundError exception.
View 2 Replies
View Related
Mar 21, 2010
Somethings I'll have an? .xml file selected when I compile a project, only to have a? .out.xml generated. Deleting the file doesn't clear the error, and Eclipse won't compile the project. It just reports that your project contains errors. The solution is to go to Project/Clean. This will clear the error in the project and allow it to compile.
View 6 Replies
View Related
Aug 11, 2010
I can now get our Android project to talk to our non-Android project. But there's still an issue: I are trying to have an Android class call a non Android Hello World class. I tried compiling our non-Android Hello World class in a separate Eclipse workspace. I then packaged it into a jar. I imported that jar into our Android Hello World class.
I then called one of the methods in the non-Android Hello World class. When I ran the Android Hello World class as an Android application, the following runtime error occurred. Here are the Android debug logs:
08-11 09:07:56.764: ERROR/AndroidRuntime(333): FATAL EXCEPTION: main
08-11 09:07:56.764: ERROR/AndroidRuntime(333): java.lang.ExceptionInInitializerError
08-11 09:07:56.764: ERROR/AndroidRuntime(333): at com.hello2.hello2.onCreate(hello2.java:27)
08-11 09:07:56.764: ERROR/AndroidRuntime(333): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1047).....................
View 1 Replies
View Related
Jun 6, 2010
I have 2 android projects out of which I modified one to work as a library. I want the main project to refer to this library to perform few functions. While this scenario works just as expected, I want to introduce one more functionality. I want to link this library project with another just a java project which has code common to both Android and Blackberry applications. This second part however doesn't seem to work and throws "The application <appname> (<package name>) has stopped unexpectedly. Please try again" with a ForceClose button. I would greatly appreciate if someone can give a brief information on how to make this work.
View 2 Replies
View Related
Jan 25, 2010
I am a C# developer and getting started with Android. I am attempting to duplicate a couple applications I already have in VS. The project is made of 2 executables and 1 common assembly. The 2 executables contain the application specific logic while the common contains centralized forms and logic (such as login form). I am using Eclipse. So how can I accomplish this layout?
View 1 Replies
View Related
Sep 15, 2010
When I right click the project in the eclipse, select "Properties". In the property page, select Android. According to the document, you can add the library project through that page. But my problem is that, there is no library information on the page. It only lists "project build target"
View 2 Replies
View Related
Jul 19, 2010
I have created a library project. When I use the library project in other project, it compiles. How ever, when I run the application, it always get the error "The application has stopped unexpectly.".
View 4 Replies
View Related
Sep 9, 2009
I want the application to run in background. This application should run continuously and should never get killed. Will running application as Service solve this issue? The application should get started automatically on start up. I don't need any GUI for this application. The main issue is Service getting Killed. Does service get killed ? and in what conditions will that happen?
View 4 Replies
View Related
Aug 25, 2009
i have some problem to communicate with a service from an Android application.The service is in a first package "package com.myService" and the application in another on "package com.myApplication".My service work and start well but my next step is to add an AIDL interface to external applications.I have tried to follow the recomandation described here : http://developer.android.com/guide/developing/tools/aidl.html, but i have still the following error (given in the log service):W/ActivityManager( 568): Unable to start service Intent { action=com.MyApplication.IBootstrapService }: not found
View 2 Replies
View Related
Mar 24, 2009
I'm writing an app that needs one or more applications/services that are distributed with their own seperate apk file. I'm writing a user-app that allows the user to upload pics using a service. The service can be used by multiple user-apps, not just mine. I'd like to have the service being installed in its own apk, instead of bundling it with each user-app. Has anyone had experience with this scenario? What is the best scenario i should implement so that the user downloads the service that the user-app needs? Can be this be done automatically (that would be best)? If not, in your opinion, what would be the most user-friendly way for doing so?
View 4 Replies
View Related
Apr 26, 2010
If an application begins a Service via bindService or startService, will this Service object ever run from a process different from that of the application? I ask because many Android example projects begin a service and communicate to them using IPC which seems wholly unnecessary considering that, according to the Android Service documentation, "... services, like other application objects, run in the main thread of their hosting process." IPC, AIDL, and the IBinder interface only seem useful if connecting to a Service started by an application other than your own. Is this a correct or fair understanding?
View 1 Replies
View Related
Jul 7, 2010
Is it possible implement an Android application as a web service? On the official site I've read:
Note: If you want to develop a server-side application, we recommend that you implement your application as a servlet running in a servlet engine like Tomcat or full-blown JSEE container like Geronimo. If you prefer to implement a server-side application based on our HttpService, we'll assume that you know what you're doing and that you don't need help in figuring out which interceptors need to be configured.
How can I implement this? Apache TOMCAT can run on Android?
View 2 Replies
View Related
Aug 6, 2010
I have a C/S solution, which take Android as its client and PHP as its server.
I have my own account system.
I'm wondering whether I could provide my user to login my system with Google Account?
I saw there are web-solution for this, like this stackoverflow.com could use Google Account to directly login.
Is there a solution for C/S system?
View 1 Replies
View Related
Jul 13, 2009
I have a service receiving and sending data to a server in separate threads each. The service lifecycle methods look like this:..................
View 3 Replies
View Related
Jun 28, 2009
In order to share data between one of my own Android service and an application i am looking for the best way to do this. I have seen the shared memory drivers inside the GNU Linux kernel, but no Java api. Maybe the specific Google IPC Blinder cad be used for my need ?
View 10 Replies
View Related
Jul 1, 2010
Is there any fundamental difference in binding a service to an android.app.Activity vs binding it to an android.app.Application. I want to bind the service to an Application because I want to keep some global state/data in the Application instead of duplicating it in all my activities.
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
Jun 27, 2009
Are there any applications that shows exactly what applications or services that uses 3g traffic? My Magic uses pretty much 3g traffic, it looks like it updates every half hour/hour.
27.06.2009 10:42 38.9 KB GPRS 0.04
27.06.2009 10:07 36.9 KB GPRS 0.04
27.06.2009 09:32 36.9 KB GPRS 0.04
27.06.2009 08:30 40.1 KB GPRS 0.04
27.06.2009 08:15 2.3 KB GPRS 0.00
27.06.2009 07:40 36.7 KB GPRS 0.04
27.06.2009 07:05 37.0 KB GPRS 0.04
27.06.2009 06:30 36.8 KB GPRS 0.04
27.06.2009 05:55 36.9 KB GPRS 0.04
27.06.2009 05:20 38.2 KB GPRS 0.04
27.06.2009 04:44 35.8 KB GPRS 0.04
27.06.2009 04:10 78.6 KB GPRS 0.08
27.06.2009 03:34 38.2 KB GPRS 0.04
27.06.2009 02:05 43.8 KB GPRS 0.04
27.06.2009 01:56 36.5 KB GPRS 0.04
View 2 Replies
View Related
Jul 3, 2010
I have data that is to be refreshed from the Internet. Let's call it Model.
What I want to do: Basically it sounds like an MVC model, where the Model is also kept persistent in local (private) storage. The Model and its associated methods are application-wise. There are several Activity's that display and manipulate different aspects of it:
User
navigates across different Activity's
that display Model
from different perspectives. Currently I have a ListActivity for all elements, and an Activity for one element's details
Sometimes Model needs refreshing.
Surely this is done on a different thread. Refreshing can be triggered from several Activity's.
There are several (time consuming) common
tasks that can be triggered from different Activity's
My application loads and saves Model
to private storage when it starts
and stops
My problem: I'm not sure where to put Model and the related tasks in. Also, I don't know what mechanism to use to notify Activity's. Currently I come up with 2 approaches:
Use Service and send broadcasts. Saving to disk is performed in Service#onDestroyed(), so I want to minimize that by binding it to Activity's. At this point, I'm also not sure how to deliver the updated information: whether to provide a getter in Binder, or include that in the broadcast message.
Customize the Application object so that refreshing methods and getters are available globally. I then perform update from Activity's using AsyncTask. If there are other Activity's that are behind the current Activity, they will update in onResume() when the user navigates back.
Reasons I'm not using a class with static methods:
I need to save and store Model to disk. Some of the methods need a Context for displaying toasts, notifications, caching, etc.
Also, I don't put these functionalities in an Activity because there are several activities that manipulate the same piece of persistent data.
Below are pseudocode illustrating what I mean:
Using Service:
CODE:............
Make the functionality globally accessible in the custom Application object
CODE:...........
Weaknesses I can think of for the Service approach is complexity, since Binding is asynchronous. And it's very likely that I have to repeat some code because I have both ListActivity and Activity
For the Application approach, the documentation says not to rely on onTerminate() being called.
View 3 Replies
View Related
Sep 16, 2010
I m developing an app.in which service start at boot time. but after some time it goes crash and also it is installing a new apk.. i m not understanding what is the problem..becoz there are so many problems in this Plz take a look at it and help me..
I/DEBUG ( 30): debugged: Jun 30 2010 13:59:20
D/qemud ( 37): entering main loop
I/Netd ( 29): Netd 1.0 starting
I/Vold ( 28): Vold 2.1 (the revenge) firing up
D/Vold ( 28): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
W/Vold ( 28): No UMS switch available
D/qemud ( 37): fdhandler_accept_event: accepting on fd 10
D/qemud ( 37): created client 0xe078 listening on fd 8
D/qemud ( 37): client_fd_receive: attempting registration for service 'boot-properties'
D/qemud ( 37): client_fd_receive: -> received channel id 1
Code...
View 5 Replies
View Related
Jul 2, 2010
I have a call blocking application. It has 3 files:
1) class BlockMyCall extends BroadcastReceiver
2) class SimpleClass1 extends Service
3) PhoneBlock extends Activity
I start "PhoneBlock " Activity to call Service "SimpleClass1 ", which eventually calls "BlockMyCall" intended to block outbound calls (by setting result to "null").
I want to know if I can run the class1 from service without starting activity. If so , how?
View 2 Replies
View Related
Aug 31, 2009
I have created a service and want to expose the interface to other applications. For one service I have done this successfuly. I just put the AIDL interface into the new project and all worked fine. Now for this service I've done the same but I get a java.lang.VerifyError when trying to use this interface. I think that the problem is that the AIDL uses a class (PolicyRole) that is only defined in the source code of the service. To compile the source that uses the interface I had to link against the code of the service but at runtime the error appears. Code...
View 2 Replies
View Related
May 12, 2010
I have a app that only consists of 2 services and a broadcast receiver (they check the internet periodically). I need to store preferences that can be shared across those services. Is this the same as for an activity? Just use getsharedpreferences()? This doesn't seem to be documented very well.
View 1 Replies
View Related
Jul 8, 2010
I am trying to create a Servicefor my application which will negotiate Bluetooth connections and data. I want this service's lifecycle to start and end with the Application, but still be able to have specific Activities listen for events that occur within this service (in addition an Activty should be able to call specific methods of the Service to write data or query connection state).
I started by creating AIDL interfaces for my callbacks and service, but I can't figure out exactly what I'm doing.
How is the best way to go about this? EDIT: To be clear, I do not specifically need (or want) more than one process for my application. Right now I don't have more than one; I'm just using AIDL because it is the only way I know of for a Service to communicate with an Activity.
View 1 Replies
View Related
Jul 28, 2010
I have a local Service running together with my application. I also have a class derrived from Application class.
When the local service is created it gets and uses the Application instance using getApplication.
Can the app itself be terminated while my service is still running and what happens if so? Would getApplication return null?
View 1 Replies
View Related