Here is the log. BatteryChanged onReceive events.
As you can the onReceive is executing on process 2072 which is the service process just fine until 20:52. At 20:52 new processes are spawned and my Application onCreate is called. My service is not being killed and restarted because I would seen those log messages. Neither is my application starting. 04/23/2012,20:18:03 (2072.01) processBatteryChanged:81 ***Event*** - processBatteryChanged plug type is USB battery level is: 95 04/23/2012,20:18:33 (2072.01) onStartCommand:76 LocalService:Received start id 116: Intent 04/23/2012,20:18:33 (2072.01) processBatteryChanged:81 ***Event*** - processBatteryChanged plug type is USB battery level is: 96 04/23/2012,20:19:03 (2072.01) onStartCommand:76 LocalService:Received start id 117: Intent 04/23/2012,20:19:03 (2072.01) processBatteryChanged:81 ***Event*** - processBatteryChanged plug type is USB battery level is: 97 04/23/2012,20:19:33 (2072.01) onStartCommand:76 LocalService:Received start id 118: Intent 04/23/2012,20:19:33 (2072.01) processBatteryChanged:81 ***Event*** - processBatteryChanged plug type is USB battery level is: 98 04/23/2012,20:20:03 (2072.01) onStartCommand:76 LocalService:Received start id 119: Intent 04/23/2012,20:20:03 (2072.01) processBatteryChanged:81 ***Event*** - processBatteryChanged plug type is USB battery level is: 99 04/23/2012,20:20:33 (2072.01) onStartCommand:76 LocalService:Received start id 120: Intent 04/23/2012,20:20:33 (2072.01) processBatteryChanged:81 ***Event*** - processBatteryChanged plug type is USB battery level is: 100 04/23/2012,20:52:23 (8638.01) init:135 Application:onCreate called 04/23/2012,21:22:41 (9405.01) init:135 Application:onCreate called 04/23/2012,21:52:57 (9727.01) init:135 Application:onCreate called 04/23/2012,22:27:03 (10009.01) init:135 Application:onCreate called 04/23/2012,22:57:09 (10339.01) init:135 Application:onCreate called 04/23/2012,23:27:17 (10596.01) init:135 Application:onCreate called 04/23/2012,23:57:24 (10945.01) init:135 Application:onCreate called 04/24/2012,00:27:30 (11271.01) init:135 Application:onCreate called 04/24/2012,00:58:10 (11536.01) init:135 Application:onCreate called On Apr 26, 8:33 am, Mark Murphy <[email protected]> wrote: > On Thu, Apr 26, 2012 at 8:25 AM, beachboy <[email protected]> wrote: > > I did omit the registerRecevier() in the example but it is my code. > > From the logs I am receiving onReceive is being called on a new > > process and my Application.onCreate() is being called where i print > > the Process Id and these new Process Id are all different. > > > My receiver is being used in my service. > > It is syntactically impossible for a BroadcastReceiver, created the > way you did, to be in a different process than the service from which > you registered it. Java simply does not support that. > > Perhaps you added android:process to your service, in which case I > humbly suggest that this is not needed and could be removed for > greater efficiency. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Training in NYC:http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

