Android :: Signal An AppWidgetProvider From Service Running In Another Process

Feb 2, 2010

I am attempting to signal my widget such that it receives my new Intent from my service

The code I am using to send from the service is as follows:

CODE:...........................

Android :: signal an AppWidgetProvider from service running in another process


Android :: Updating AppWidgetProvider From Service

Jan 1, 2010

Here is my issue, I want to be able to update a specific AppWidgetProvider (home screen widget) from a custom service class. I have to build the remote view in the service because I'm also doing some networking in there, which takes some time. The problem is that I can't figure out how to update a specific widget (individual widgets can have different update intervals, using the alarm manager). If I wanted to do it from the onUpdate of the AppWidgetProvider I could just call appWidgetManager.updateAppWidget(appWidgetId, remoteView); Does anyone have any experience with this or any suggestions?

View 4 Replies View Related

Android :: Remote Service Process Persists - I.e. Won't Disappear From Process Table

Feb 21, 2009

At a certain point in my program, when I'm completely done with my service, my activity executes unbindService() and stopService() -- yet the process persists. I can tell that it persists because I run "ps" in "adb -e shell":

CODE:.............

"adb logcat", I can show you the sequence of events:

ACTIVITY: context.unbindService(serviceConnection);

SERVICE: onUnbind();

ACTIVITY: stopService(serviceIntent); & returns true!

SERVICE: onDestroy();

First, my activity calls unbindService(serviceConnection). According to the documentation, unbindService() will "Disconnect from an application service. You will no longer receive calls as the service is restarted, and the service is now allowed to stop at any time." So that is fine, and it is happening.

Appropriately, we see the onUnbind() call happen on the service side. According to the documentation, onUnbind() is called when "all clients have disconnected from a particular interface published by the service." So this confirms the correct service connection is being passed, and that the service is responding accordingly.

Next, my activity calls stopService(serviceIntent), and returns true. According to the documentation, stopService() does the following: "If there is a service matching the given Intent that is already running, then it is stopped and true is returned; else false is returned." Again, this is happening and returning true.

In response, the service's onDestroy() method is called. According to the documentation, onDestroy() is "Called by the system to notify a Service that it is no longer used and is being removed. The service should clean up any resources it holds (threads, registered receivers, etc) at this point. Upon return, there will be no more calls in to this Service object and it is effectively dead."

At this point I expect the process to disappear from the process table. Yet it remains indefinitely. But why?

Also, the process is so persistent that I can bind to it again, and I see that it is the same exact process responding because the PID (process ID) is the same!

View 4 Replies View Related

Android :: List Of Running Process Running In The Background

Aug 19, 2009

I am trying to get the list of process running in the background.

View 4 Replies View Related

Android :: Running More Than One Apk In The Same Process

Jan 30, 2009

According to the docs in the Android developer's site, processes can be used to reduce overhead by running the code of multiple .apks in the same process. (see application model) What I'm wondering is HOW I can run multiple .apk in the same process.

Since an image from one of the Google I/O video shows that process can run one .apk or just part of one .apk, I'm little confused about processes.

View 4 Replies View Related

Android :: Running Two Applications In The Same Process

May 12, 2009

I want to run two different android applications in the single process to access the resources. For that purpose, I had made following two changes in the manifest file of both the application ,

I had override two attributes and

1) android:sharedUserId= "hii.hello" under <manifest> tag 2) android:process = "guide.android" under <application> tag

I had made these changes (asign the same values) in the both the applications but could not get expected results. How to check whether both these applications are running in the same process?

Should I sign both the application with the same certificate?

View 4 Replies View Related

Android :: Can't Kill Running Process When Exception Through

Aug 9, 2010

I am a freshman and my English is poor.In some cases, I terminate the application and the DVM process couldn't be killed when a exception through, why is this? and how the problem is to be tackled?

View 2 Replies View Related

Android :: Possible To Avoid Running Of Multiple Process

Mar 3, 2010

I facing problem with multiple process running for my application. Can any one help me to avoid creating multiple process or restricting process creation to one.

Some times I am seeing two process instances of my package in the process list. I want to avoid this.

View 2 Replies View Related

Android :: Application Service Ever Run In Different Process?

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

Android :: Process Down After Loadlibrary In Service

Apr 1, 2009

I need to load a .so library in my Service onCreate method, but the process just down after System.load. On the other hand, the same code can work in Activity. Are there some differences between activity and service in the way of load .so file.

My code class AisoundService extends Service

CODE:......................

View 3 Replies View Related

Android :: Need Command To Find Out Pid Of All Process Running On Emulator

Mar 17, 2009

Is there a command to find out the pid of all process running on the emulator? If yes, can you please tell me how can I do that?

View 3 Replies View Related

Android :: Accessing Environment Variables By The Running Process

Mar 3, 2010

I want to know if there is a way to pass environment variables to the running process in Android. If yes, how should one set those environment variables.

View 4 Replies View Related

Android :: Singleton In Different Service Which Share Same Process

Mar 25, 2009

I have two services, both of them lies in separate apk, which run in same process. The two service share same jar file by <uses-library> method. The jar file implement a class, say "test", is a singleton. But I found that two instance of test is created under this case, could anybody give me some tips? I want to ensure it's singleton. Code...

View 8 Replies View Related

Android :: Show Dialogs In Service Process?

Feb 5, 2009

I intended to show a dialog in a service process, then I tried to use the AlertDialog but got the below error message: WindowManager$BadTokenException: Unable to add window -- token null is not for an application The reason seems to be that the dialog is not used in a application context (activity should be fine?) Was there any way that can solve this problem?

View 2 Replies View Related

Android : Check The Foreground Process From A Service

Aug 20, 2010

Does anyone know how to, or if it's even possible to check the (foreground process/top of the activity stack) from a service?

View 20 Replies View Related

Android :: Make List For Process Running In Power-on Time?

Mar 3, 2010

When I connet device to DDMS sdk tool, I can see the running process.But I don't think that those process are tatal processes.For example, I have 10 android applications, A, B, C, D, E, F, G, H, I and J.If I want to run only A, B, C application on the power-on, how can I do that.?Where can I make a list for processes running in the poweron time.?

View 2 Replies View Related

Android :: List Of All Process Running In Droid System And Kill Some Of Them?

Apr 27, 2010

Is it possible to get list of all process which are running in the Android system, and kill some of them? I know that there are some applications (task managers), but I would like to write my own, simple application.

I would like to write simple task manager, just list of all process and button which will kill some of them.

Could you just write some Java methods which I can call in order to get list of process, and method for killing them. Or just give me some advices.

View 3 Replies View Related

Android :: Design Considerations - Sync Process And Using Service

Sep 29, 2010

I'm designing an android app which will need to do the following steps:

1. User pushes a button or otherwise indicates to "sync data".
2. Sync process will use rest web services to move data to and from the server.
3. The data will be stored locally in a sqlite database.
4. The sync process should provide status updates/messages to the UI
5. The user should not be allowed to wander off to other parts of the application and do more work during the sync process.

The first time the sync process runs, it may take 10-20 minutes. After the initial sync, less data will be transferred and stored and I expect the process to take 1-2 minutes or less. I've been doing a lot of reading about android's AsychTask and various examples of using a Service. But I don't fully understand the design considerations and trade-offs of choosing one design over the other. I currently have my demo project stubbed out using an AsychTask. After watching (most of) Developing Android REST client applications:
http://code.google.com/events/io/2010/sessions/developing-RESTful-and...
I'm left confused the design patterns described here feel overly complex, perhaps because I just "don't get it" yet.

View 19 Replies View Related

Android :: No Network Connectivity In Service/AlarmManager Process

Mar 24, 2010

I have a Service/AlarmManager set to go off ever hour; as seen at: http://github.com/commonsguy/cw-advandroid/tree/master/SystemServices...

The Alarm triggers a Socket connection to communicate with a Web Server. I'm logging the interaction to a file so I can see it later. When I leave the phone on my desk for a day, it seems that more often than not I get a "Network unreachable" error when trying to do any networking.

I believe it is related to how deeply the phone goes into sleep. Is there a special kind of lock I have to hold, or some command required to prep the wireless radio so that it can be ready to access the Internet?

View 21 Replies View Related

Android :: Inter-process Communication With A Service And Notifications

Dec 13, 2009

I'm having an issue with inter-process communication with a Service and Notifications

The structure of my application is as follow: - ListActivity (TunnelDroid), once the user presses a listitem it will start a Service. The ListActivity is binded to the service for intra-process communication

- Service (TunnelManagerService): running in the background. This service will add a (permanent) Notification in the statusbar. Using a Handler I sometimes need to communicate with the ListActivity (to show GUI Dialogs)

- Notification: Once this notification is clicked it should open the ListActivity.

To add the action when the user touches the notification I use the following code: notificationIntent.setClassName("net.sourceforge.tunneldroid","net.sourcefo­rge.tunneldroid.TunnelDroid"); Then I use the intent to create the notification.

Unfortunately a new Intent is opened. When I press the back button the original ListActivity is shown. So I have two instances of my same class/list.

How could I make sure the original ListActivity is opened when the user touches the Notification?

It's OK for me if the original ListActivity was previously destroyed, but I cannot have two instances. The problem is that the Handler in the Service has a reference to the ListActivity (PARENT_ACTIVITY), so if another instance is created I have invalid references. I could overwrite the PARENT_ACTIVITY, but then when the user presses the back button I have an instance with no correct link to my Service resulting in a crash/nullpointer.

The complete source can be found here: http://tunneldroid.svn.sourceforge.net/viewvc/tunneldroid/tunneldroid. Attached you can find a drawing of (most of the) inter-process communication. Could someone point me in the right direction?

View 3 Replies View Related

Android :: How To Establish A Two-way Communication Between Activity And Service In Different Process

Mar 19, 2010

I'm working on establishing a two-way communication between an Activity and a Service which runs in a different process.

Querying the process from the Activity is no big deal. But I want the process to notify the Activity on events. The idea behind it is this: the service runs independently from the actual app. It queries a webserver periodically. If a new task is found on the webserver the process should notify the activity.

I found this thread over at AndDev.org but it doesn't seem to work for me. I've been messing around with BroadcastReceiver. I've implemented an interface which should notify the Activity but the problem is that the listener is always null since the Broadcast from the process is done via Intent, hence the class that extends BroadcastReceiver will be newly instantiated.

How can I establish a 2-way communication? This has to be possible.

View 3 Replies View Related

HTC Incredible :: Running Process Toggle ?

May 25, 2010

I installed an app called Running Process Toggle and didn't like it so I uninstalled it but the process list is still on my screen in the upper right corner. I rebooted and it's still there and won't go away.

View 3 Replies View Related

Android :: Remote Process - Service Fetches Data From Network

Sep 15, 2009

I needed to call a remote service. The service basically fetches data from the network. I am bind the connection once,and then I unbind the connection when the user is no more in that page. Everything works fine.Except that when I call the sa,e remote method for 17th time,it just does not call the service at all.It neither throws the DeadObjecti Exception. I have run out of ideas.Is there anything that I may be missing.

View 7 Replies View Related

Android :: Automate Process Of Publish Droid App / Google Have Web Service To Do That?

Nov 10, 2010

We have several Android apps and found that the process of uploading apps for each release via Android Developers website slow and ineffective. We like to automate the process. To be more clear, we have automation for compiling and building the apps, it's a matter of uploading them to Android Market and fill in the app details for publishing. This is where we are left with manual publishing.

I am interested to learn how people automate the processing?

Does Google have a web service of some sort for publishing Android App on Android Market?

View 1 Replies View Related

Android :: Keep Broadcast Receiver Process Alive / By Creating Service That Stays Around?

Sep 16, 2009

The app widget documentation indicates that the "widget provider"being a receiver of a broadcast service may not exist (the process) beyond the completion of the call.If I want to maintain state between two broadcast events, such as say widgetProvider.onUpdate(), can I start a local service and leave it hanging there until my widgets are disabled? If I didn't explicitly stop that service will it be loaded again and resumed when the device wakes up.

View 4 Replies View Related

Android :: Resulting Thread Id Scoped Per Process / Current Activity / Service?

Jul 21, 2010

When you do a Thread.currentThread().getId(), is the resulting thread id scoped per process or scoped to the current Activity/Service?

View 1 Replies View Related

Jelly Bean :: Unknown Android OS / Service Process Battery Drain?

Sep 16, 2013

What is weird to me is that on the closeup line graph the second half plummets much faster than the first half. But at the same time, the second half doesn't nearly have as many wakelocks (as indicated by the "Awake" bar being basically completely empty during that time.

What the mobile network colours represent but I never had this problem previously with it on all the time so this shouldn't be an issue. GPS is always on. Again, this was never an issue until supposedly now so this also shouldn't be an issue.

Now, the four big drainers are Cell Standby, Android System, Google Services, and Android OS. Cell Standby I know is due to a missplaced decimal point in the framework, so I know that's just false battery recording. Android System I don't have a clue what the problem is, I read somewhere it might have to deal with wakelocks. But it won't tell me what process exactly is causing battery drain. Google Services are well, google services. I don't know what are classified as google services exactly (like this was never a problem before..), and finally Android OS. Again, the battery statistics thing isn't nearly specific enough.

View 4 Replies View Related

Motorola Droid X :: Running 2.1 Update1 - Process And Procedures Little Different

Sep 21, 2010

Just came from an rooted droid eris. That was a HTC phone and while just getting familiar with the X it seems the process and procedures are a little different/more confusing. My brand new X came with 2.1 update1. Now my only reason/purpose for rooting is really only for custom roms(if even available or stable for the X yet, but not that important atm)/apps requiring SU permissions like wireless tether and setcpu.

Although I doubt I'll need to oc this beast. And tweaking the os to be better/faster/how I want it like removing bloatware. With that being said, like I said I am running 2.1 update1. And I am hearing something about the X getting Froyo 2.2 anyday now? Should I wait for that to hit my phone before I do anything?

View 3 Replies View Related

HTC EVO 4G :: Suspend Process - Running CPU At 50%-60% While Phone's Supposed To Be Asleep

Aug 28, 2010

I noticed a weird battery drain on my EVO over the last week or so. I've got the System Panel app, and it appears there's an internal process called "suspend" that is running the CPU at 50%-60% while the phone's supposed to be asleep.

I have the un-updated facebook app, and it doesn't have any login information anyway. The problem started occurring around the time I installed Pandora; have there been any reports of problems with that app? Alternatively, does anybody know what might be causing that process to chew CPU cycles?

View 37 Replies View Related

General :: ICS Find Which App Is Calling Service / Process

Jun 9, 2012

I am trying to reduce the battery consumption on my Note. I have several apps which use the GPS but the gpsd process is being called quite a lot, even when I am not using any GPS app.

Simple question - now that I have established which service is being called (using better battery stats) is there a way to determine which app(s) are using it? GT-N7000

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved