So from what I've known, if I do an AsyncTask inside an Activity, the task may be killed when user quits the Activity before it is finished. One solution I've seen is using IntentService, which the system will try hard not to kill.
My problem is that IntentService only uses one background thread to run all the tasks one by one. I have s...
Hi all,
many web provider have support for php but generally memory limit is very limited.
My web site needs to do image resizing, so I would have use library like gd or phpthumb, but I encounter problem with the memory limit.
So I would like to know if someone knows about an online web service that does image resizing.
Of course, a fr...
I'm running Mongo DB as windows service and every second time I stop the service it reports "Error 109: The pipe has been ended". Here is the command line being used to run the service
"C:\Temp\mongodb\bin\mongod" --service --serviceUser --servicePassword --dbpath C:\temp\db --rest --logpath C:\temp\db\log\mongo.log --logappend --dire...
I have a net.tcp WCF service, and I would like the OS to pick the port that it should listen on. So I have set the port to 0 in my URI, and netstat confirms that the OS has picked a port in the 5000 range.
How can I find the actual port that has been picked, in code, inside the service process?
Some code to show what I have tried:
Ty...
Hi, I'm trying to run a android app while the screen is black, i used a service and i tryed to add also a WakeLock of the type "PARTIAL_WAKE_LOCK".
The service play a song and save data from the accelerometer to the db, but when i press the red phone button to make the screen black, it play the song but it don't save data to the db. Hav...
I'm not sure where to do database lookups for Spring controllers.
It seems to make sense to use the Spring @Service stereotype and create multiple "services" to provide lookup support to controllers rather than doing lookups directly in the controllers.
Is this correct or is there a more appropriate place to perform database lookups?
...
Dear stackies,
what I need to do is auto-register device if not already done and then start polling messages with the credentials I received through this registration.
Now, after I read quite a bit about services, threads, asynctasks and the AlarmManager I'm totally confused about how to handle this. :-s
So, there are my two main task...
Hi,
I have some questions about the Android service and activity lifecycles. Hope you guys can help me out. I have written an application that uses GPS location and stores them. It must monitor the GPS location updates constantly to work properly.
Right now, it's all in one activity. So when you close the activity, you loose everything...
Hi guys,
I have to implement a Windows Service (I'm working on XP) that uses MSNMessenger API.
Well, my "normal" application works good, but when I porting this on a Service, I received this error:
Creating an instance of the COM
component with CLSID
{F81CD990-910B-4BBF-9CB3-6A77F3D697B3}
from the IClassFactory failed due to
...
Hello!
I have an Activity "A" which instantiates two objects from the Facebook Android SDK. I put these two objects into a static HashMap with unique static keys and their references. From other activities "B" and "C" I'm able to get these two corresponding references via myhashmap.get(). These two Activities are within the same applica...
Hi all,
I am attempting to write a batch file that kills the windows audio service using the following
taskkill /F /FI "Services eq Windows Audio"
however I am unable to get taskkill to handle the space in the service name. Any ideas?
Thanks
...
Hi
I've an IntentService which updates an AppWidget. That Service starts every time the AppWidget is being placed on the Screen or when the AlarmManager /ContentObserver / OnChangeListener get called. It stops itself after updating the widget.
UpdateService.java:
@Override
public void onCreate() {
contentObserver = new CustomConten...
I've been watching Virgil's presentation at the Google I/O on REST-heavy applications.
Google I/O 2010 - Android REST client applications
Though the notepad tutorial makes database calls directly from the UI layer, Virgil suggests making database calls in a Service.
At the moment, my Activity's onCreate method uses an extended Content...
Android: i want to create service by extending a Service class which i start when application get started and all activities can share its state and when i want stop it from other activity and when i want start it again from any activity ?
...
I have created a service in win32,c++ . I am able to create the service , but when I try to start it, it gives following error.
[SC] StartService FAILED 1053:
The service did not respond to the start or control request in a timely fashion.
What is the best way to get to the root cause, since this error message is not conveying anything...
I'm trying to figure out how to launch a Service from a singleton class I've created.
According to the Android documentation, startService is a method of Context. So, in the method call I am making to the singleton class, I figured I would pass on the application Context as a parameter. Easy enough. However, when I try to use that co...
Hi.
I just want to know how detect that the activity or service has been killed by the advanced task killer? I was expecting the onDestroy method to be called, but it doesnt!
My app starts the background service on boot. The activity is not started except from menu. But its name appears in the advanced task killer list. When I try to ...
Hi all,
I have an app that has a widget. In the main app, I have an ad framework (cannot be edited due to licence) that is accumulatively leaking approx 1MB every time I exit the app. It appears one of its threads are running in the background (unnecessarily) that will keep its process and these threads will be created again when I laun...
So I understand the service lifecycle and all that. But I'm confused what the startId parameter is for?
public int onStartCommand (Intent intent, int flags, int startId)
I get that it's used in conjunction with stopSelf(int), but I don't see what the point is or where the startId is being generated. What use case would using stopSelf...
So I'm working on a service that will handle requests to send data to a socket.
I've done socket programming in a service before, but only within the same application. I'd like this to just sit and do nothing until any application wants to give it data to send. That's all well and good.
I have register an intent filter and the usual st...