service

android alert dialog from service

How do i display dialog from a service ? ...

android start activity from service

Android: public class LocationService extends Service { @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); startActivity(new Intent(this, activity.class)); } } I launched this service from activity In activity if condition satisfies start startService(...

Android - how to make sure my Service is restarted?

I have an Android application with a background running Service. When the Service crashes or gets killed by Android I can see that Android tries to restart it again. However the Service never actually restarts, I can see Android scheduling the restart but it new actually happens. My code is as follows: @Override public void onCreat...

Huge memory usage in notifications

Hi, I am developing an application with a service which show the progress of a timer in the notification area (with a progress bar and a text). I have extracted below a simpler example with the same problem. The code of the Service: public class TNService extends Service { private NotificationManager nm; private Notification ...

API RemoteService confusions

I'm trying to architect a REST-heavy application. Following one of the models proposed by Virgil in his Google I/O presentation, I've set up my application like so: My Activity calls upon a "Service Helper" which is a singleton. This singleton instantiates a Service which, upon start, uses a ContentProvider to hit my application's dat...

Android: How to send back data from thread to service?

Hy! I have a service from which a start a new thread. This new thread will communicate with a TCP server using socket. What is the best way to send the data received from TCP server back to the service? Handlers or something else? Thanks in advance, kukukk ...

update list in application when service works

So i have a service that creates letters and puts them in a database (sql-server). I also have an application (c#,wpf) where there's a list with letters(from the database) How can i trigger an event in the application if a new letter is made? (so that the list should be updated) Anyone who knows how to do this? Thanks ...

JSON Data cannot be matched to web service signature

I still can’t seem to get this to work.I’ve tried string arrays object arrays dictionaries. I might be formatting my JSON incorrectly however I am using the labs_JSON plugin. If I remove my data and test the webservice it calls correctly. The : My code looks as follows : HTML : <div style="display: block; float: left;"> <asp:R...

Android service for TCP Sockets

Based on a suggestion in a previous question I asked on here, I'm trying to push my socket connection for an application that I've written into a service. I spent the better part of the day yesterday researching services and actually mocked up a few (one remote, one local). My question is in two parts: 1) after having played with both...

Is this a memory leak?

I have a ListActivity containing an object I've defined called a MessageItem. I want to pass the data in this MessageItem off to a Service to do some stuff, but I don't want the Activity to be data bound to the Service such that Android can't reclaim the Activity if it needs to (ergo memory leak). What I'm doing is passing the MessageI...

How to set Priority of IntentService in Android

I was wondering if it is possible to set the priority of an IntentService like you can with a Thread. So far I have not found anything. ...

Android - How to work with Services?

The first time my app loads it starts my main activity, and inside my main activity i automatically start a service: Intent s = new Intent(this, Soc.class); startService(s); //start the service for the first time I need to make sure that when the user is opening the app NEXT TIME, it kills the old service, and recreate the service: @...

Setting up the IMediaPlaybackService for Android.

Hello all, I'm having trouble with the IMediaPlaybackService for Android. I'm told that all I need to do is place it into its package (in this case, com.android.music), however I can't get my project to build when I do this. The code for IMediaPlaybackService is as follows: /* //device/samples/SampleCode/src/com/android/samples/app/R...

how to open a user's clipboard from session 0

i need to perform this operation for a user in a session from a service running in session 0: 1. RegisterClipboardFormat 2. IsClipboardFormatAvailable ...

C++ Service Error While Starting : Could not Start the Service on Local Compueter

I have created a Win32 Service using C++ and installed to the Services Successfully. Now While I try Starting the service from Services.msc , I am getting the Error: Could not start the Service on Local Computer . Error 2: The system can not find the File specified. Here is the code snippet I am defining in the Service Entry Point: #i...

bindService not working inside a button click but works in onCreate - android

I have a pretty simple local service that I'm trying to bind to my activity. I worked through this yesterday with CommonsWare and he got me straightened out as I was having a difficult time getting the service to bind. It turns out that the reason I was having so much trouble was that I was trying to bind the service with: bindService...

.Net Socket Server Page Faults

I have a vb.net asynchronous socket server/listner service that is showing extremely high "Page Faults" in the task manager. Can I please have some feedback as to what this implies and how do I go about resolving the issue? Thanks for all feedback. ...

calling a method from android service immediately after it's bound on onCreate

I'm pretty sure that android services are going to be the end of me. I have almost no hair left after the last few days.... ...anyway, I digress. At first I was having a heck of a time getting the service to bind on an onclick of a button, got that straightened out from help here yesterday. Now I actually want the service to bind in ...

How can I log on to Windows using a service?

Hi, I have written a Windows service and I am hoping to find a way of having that service log the machine onto Windows. I understand that services and desktops are seperated for security and that the windows logon desktop is probably also secured in other ways - but this must be possible? ...

creating service accounts in windows server 2008 R2

hello. how can I create a service account such as sql service in active directory on win server 2008 R2? I dont know in which part of administrative tools i can find it. ...