[android-developers] Broadcast Receiver service in a widget

2013-05-28 Thread Kromosome
try start_sticky :) -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com

[android-developers] Broadcast receiver in foreground activity - not reliable?

2013-03-10 Thread lbendlin
I got a user reporting that our app does correctly terminate when the user's device exits car mode, but only when the activity that contains the receiver is not active. If the activity is in the foreground then more often than not our app does not terminate. The activity is defined as

Re: [android-developers] Broadcast Receiver to listen when any app launch?

2012-09-17 Thread TreKing
On Sun, Sep 16, 2012 at 3:04 AM, Sohan badaya sohan.bad...@gmail.comwrote: I want to be notified when any app launch like Calculator, Email etc, There is no such notification. - TreKing

Re: [android-developers] Broadcast Receiver to listen when any app launch?

2012-09-17 Thread Kristopher Micinski
You can't do this. Generally it's considered kind of dubious to need to know when other apps start (i.e., what are you trying to write, an app that spies on the user?). Presumably you are trying to write some kind of helper app that provides extra system utilities, this is not really possible

Re: [android-developers] Broadcast Receiver to listen when any app launch?

2012-09-17 Thread Sohan badaya
Hi, Thanks for reply, But there are many apps like App Lock, Fast App Lock, Smart App Lock working on same idea. If anyone knows how can I achieve same functionality. Sohan Badaya On Mon, Sep 17, 2012 at 1:14 PM, Kristopher Micinski krismicin...@gmail.com wrote: You can't do this. Generally

Re: [android-developers] Broadcast Receiver to listen when any app launch?

2012-09-17 Thread Sohan badaya
Thanks for reply, But there are many apps like App Lock, Fast App Lock, Smart App Lock working on same idea. In those apps you set password for any app and when you launch that app, these apps( App Lock, Fast App Lock, Smart App Lock) display password window. and after password we can

Re: [android-developers] Broadcast Receiver to listen when any app launch?

2012-09-17 Thread Kristopher Micinski
On Mon, Sep 17, 2012 at 8:35 AM, Sohan badaya sohan.bad...@gmail.com wrote: Hi, Thanks for reply, But there are many apps like App Lock, Fast App Lock, Smart App Lock working on same idea. If anyone knows how can I achieve same functionality. Sohan Badaya Ugh... I explained how this is a

Re: [android-developers] Broadcast Receiver to listen when any app launch?

2012-09-17 Thread RichardC
Google is actively trying to stop these sort of apps working, Search this group for may threads about this issue. On Monday, September 17, 2012 1:40:39 PM UTC+1, Sohan badaya wrote: Thanks for reply, But there are many apps like App Lock, Fast App Lock, Smart App Lock working on

[android-developers] Broadcast Receiver to listen when any app launch?

2012-09-16 Thread Sohan badaya
I want to be notified when any app launch like Calculator, Email etc, so I tried below code #Attempt 1 receiver android:name=.ApplicationLaunchReceiver intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER /

[android-developers] BroadCast Receiver()

2012-08-07 Thread Meena Rengarajan
Why Asynchronous Operations cannot be performed in OnReceive() method during BroadCast Receiver? Is there any specific reason ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

Re: [android-developers] BroadCast Receiver()

2012-08-07 Thread thejaswi s
The class BroadcastReceiver defines the onReceive() method. Only during this method your BroadcastReceiver object will be valid, afterwards the Android system can recycle the BroadcastReceiver. Therefore you cannot perform any asynchronous operation in the onReceive() method. refer:

Re: [android-developers] Broadcast receiver not working in ICS

2012-07-13 Thread Fabien R
On 12/07/2012 11:02, Live Happy wrote: i have a service with separate processes in my application run from Broadcast receive after boot completed i tested the code in android 2.3.3 and all is work fine but when i tested on ICS 4.0.3 even the processes exist in the applications runing but

Re: [android-developers] Broadcast receiver not working in ICS

2012-07-13 Thread Live Happy
there is no errors in the Logcat nothing appears maybe the boot complete intent dont wok on ics anymore On Fri, Jul 13, 2012 at 11:38 AM, Fabien R theedge...@free.fr wrote: On 12/07/2012 11:02, Live Happy wrote: i have a service with separate processes in my application run from Broadcast

Re: [android-developers] Broadcast receiver not working in ICS

2012-07-13 Thread Mark Murphy
On Android 3.1+, something has to manually run one of your components (e.g., user launches an activity) before manifest-registered BroadcastReceivers will work. On Thu, Jul 12, 2012 at 5:02 AM, Live Happy livehap...@gmail.com wrote: i have a service with separate processes in my application

Re: [android-developers] Broadcast receiver not working in ICS

2012-07-13 Thread Live Happy
so can u please explain to me how the whatsup work when the BroadcastReceivers will not work till u launch an activity!! On Fri, Jul 13, 2012 at 1:39 PM, Mark Murphy mmur...@commonsware.comwrote: On Android 3.1+, something has to manually run one of your components (e.g., user launches an

Re: [android-developers] Broadcast receiver not working in ICS

2012-07-13 Thread Streets Of Boston
Take a look at this info here: http://developer.android.com/about/versions/android-3.1.html#launchcontrols (if the link doesn't take you directly to this section, search for 'stopped' on that page.) Add this flag to your intent to override this behavior:

Re: [android-developers] Broadcast receiver not working in ICS

2012-07-13 Thread Mark Murphy
On Fri, Jul 13, 2012 at 11:06 AM, Streets Of Boston flyingdutc...@gmail.com wrote: Add this flag to your intent to override this behavior: Intent.FLAG_INCLUDE_STOPPED_PACKAGES That will not work for BOOT_COMPLETED, as Android is the one broadcasting the Intent -- FLAG_INCLUDE_STOPPED_PACAKGES

Re: [android-developers] Broadcast receiver not working in ICS

2012-07-13 Thread Streets Of Boston
Whoops, forgot to realize that his app is not doing the sending of the broadcast. :-) On Friday, July 13, 2012 11:55:16 AM UTC-4, Mark Murphy (a Commons Guy) wrote: On Fri, Jul 13, 2012 at 11:06 AM, Streets Of Boston wrote: Add this flag to your intent to override this behavior:

[android-developers] Broadcast receiver not working in ICS

2012-07-12 Thread Live Happy
i have a service with separate processes in my application run from Broadcast receive after boot completed i tested the code in android 2.3.3 and all is work fine but when i tested on ICS 4.0.3 even the processes exist in the applications runing but its not write the throw logs in the

Re: [android-developers] Broadcast receiver starts a new thread, do I need to kill it?

2012-07-04 Thread romdroid
Am Mittwoch, 4. Juli 2012 06:31:54 UTC+2 schrieb TreKing: On Fri, Jun 22, 2012 at 1:29 PM, Justin Robinson wrote: Is this thread killed after 10 secs along with the broadcast receiver or do I need to kill it manually? I don't know about after 10 secs (not sure where you got that number,

Re: [android-developers] Broadcast receiver starts a new thread, do I need to kill it?

2012-07-03 Thread TreKing
On Fri, Jun 22, 2012 at 1:29 PM, Justin Robinson jrob09...@gmail.comwrote: Is this thread killed after 10 secs along with the broadcast receiver or do I need to kill it manually? I don't know about after 10 secs (not sure where you got that number, but yes, once the Thread is done executing,

[android-developers] Broadcast receiver starts a new thread, do I need to kill it?

2012-06-29 Thread Justin Robinson
Every 30 seconds my broadcast receiver starts a service thread like this: Thread t = new Thread(){ @Override public void run(){ Intent intent = new Intent(context, AlarmService.class); context.startService(intent); } };

[android-developers] Broadcast receiver receive empty extras

2012-04-18 Thread viktor
Hi, I had a simple app that has Service and Application. Service sends broadcasts by Action with extras. Application receive this broadcast and handle some action by key that is in extras. Sometime application receive empty extras, so if I get Intent.getExtras(), the Bundle will be empty; Any

Re: [android-developers] Broadcast receiver receive empty extras

2012-04-18 Thread Justin Anderson
What action are you receiving? Is it your own custom action or one defined by Android? If it is a custom action then you would need to figure out why you are sending the broadcast without extras. If it is defined by Android, then it may be some other application that sends the broadcast, in

Re: [android-developers] Broadcast receiver execution.

2012-03-26 Thread Dianne Hackborn
A particular receiver can only process one broadcast at a time. As each broadcast happens, it is processed to determine the targets it should go to, and dispatched into the message queue for each target. When a later broadcast is sent, it will generally not be moved ahead of the queue. For the

[android-developers] Broadcast receiver execution.

2012-03-25 Thread Put_tiMe
I have a class which is derived from 'BroadcastReceiver'. Here I've signed up for screen-off, screen-on, battery-changed and user-present intents. I want to know how my class receives messages. Are they received in the order they were raised? Or is there a chance that messages could arrive

[android-developers] Broadcast Receiver inside a library project

2012-03-13 Thread Brett
So I created a library project (A) that does your typical random stuff and included it inside a different application project (B) to utilize its features. One thing that I wanted to do was move a broadcast receiver that catches C2DM messages from project B to the library project A. Unfortunately

Re: [android-developers] Broadcast Receiver inside a library project

2012-03-13 Thread Mark Murphy
On Tue, Mar 13, 2012 at 3:42 PM, Brett bnotting...@gmail.com wrote: It looks like unless I declare in project B's manifest to register the receiver in project A that it won't work. Correct. The hosting project always needs to declare the components. Is there any way for a library project to

[android-developers] Broadcast Receiver issue

2012-02-23 Thread brian lee
I am trying to write what I think is a very simple application just to check for when the head phone is plugged in and then mute the notification sounds. I am a bit confused on the broadcast receiver, can I have a app that is just that class and have it listen for when that action happens, do I

Re: [android-developers] Broadcast Receiver issue

2012-02-23 Thread YuviDroid
This post might help you: http://groups.google.com/group/android-developers/browse_thread/thread/6d0dda99b4f42c8f On Thu, Feb 23, 2012 at 11:09 PM, brian lee br...@brianlee.org wrote: I am trying to write what I think is a very simple application just to check for when the head phone is

[android-developers] Broadcast receiver Activity is in foreground or stop.

2011-10-20 Thread Anieeh
Hi All I am developing an alarm based application in which a broadcast receiver is set, i want to show a notification in the notification bar for alarm and i have done that but my problem is i want to show a notification on notification bar only if no other Activity is on foreground, if

[android-developers] Broadcast receiver on REBOOT

2011-10-12 Thread ranjit R
I need to trigger a broadcast receiver when it starts to reboot/ reboots not when boot_completed . i not able to trigger the broadcast receiver. below is my code public class broadcastreceiver extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) {

Re: [android-developers] Broadcast receiver on REBOOT

2011-10-12 Thread Mark Murphy
On Wed, Oct 12, 2011 at 4:41 AM, ranjit R ranjitr...@gmail.com wrote: I need to trigger a broadcast receiver  when it starts to reboot/ reboots not when boot_completed . As the documentation says, ACTION_REBOOT is only for use by system code. You are not system code, in all likelihood. Since

Re: [android-developers] Broadcast Receiver not working immediately after package installation

2011-07-06 Thread Thomas Economous
Someone stated that this is an intentional 3.1 policy change in another thread. Not sure if there is a good place to find information about changes like this. On Mon, Jul 4, 2011 at 4:29 AM, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jun 30, 2011 at 2:01 PM, Thomas Economous

Re: [android-developers] Broadcast Receiver not working immediately after package installation

2011-07-06 Thread Mark Murphy
On Wed, Jul 6, 2011 at 6:34 AM, Thomas Economous econ0...@gmail.com wrote: Someone stated that this is an intentional 3.1 policy change in another thread. Not sure if there is a good place to find information about changes like this. Got a link to that thread? -- Mark Murphy (a Commons Guy)

[android-developers] Broadcast Receiver not working immediately after package installation

2011-07-04 Thread Thomas Economous
I am currently working on an app that receives the BOOT_COMPLETED action using a Broadcast Receiver. The receiver is statically registered in the AndroidManifest.xml. It works on the next boot after installation for android 2.2 but not 3.1. With 3.1 I have to start the app once before the

Re: [android-developers] Broadcast Receiver not working immediately after package installation

2011-07-04 Thread Mark Murphy
On Thu, Jun 30, 2011 at 2:01 PM, Thomas Economous econ0...@gmail.com wrote: I am currently working on an app that receives the BOOT_COMPLETED action using a Broadcast Receiver. The receiver is statically registered in the AndroidManifest.xml. It works on the next boot after installation for

Re: [android-developers] Broadcast receiver not working in Activity

2011-05-13 Thread TreKing
On Thu, May 12, 2011 at 11:17 AM, Walid abulwalid.ka...@gmail.com wrote: Can anyone give me working example to receive a broadcast message from a custom service and update a list in the view.. http://developer.android.com/reference/android/app/Service.html#LocalServiceSample

[android-developers] Broadcast receiver not working in Activity

2011-05-12 Thread Walid
I am trying to update list in my View on broadcast receive. Can anyone give me working example to receive a broadcast message from a custom service and update a list in the view.. Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers

[android-developers] Broadcast Receiver for Mobile Network

2011-05-03 Thread Gaurang
I want to get notification on lost of Mobile network (Voice) not Wi-fi (Data). Here is the code, If gives notification for Wi-fi (Data) network events but not for Mobile network. Menifest : uses-permission android:name=android.permission.ACCESS_NETWORK_STATE/ application

[android-developers] Broadcast Receiver registering Location Listener problem

2011-01-05 Thread Raj
Android Experts, I am trying to write a simple receiver that will receive the BOOT_COMPLETED broadcast, and in turn register a location change listener. I know the receiver is transient, and has a short lifespan. Once the receiver dies, will my listener still continue to be registered, or do I

Re: [android-developers] Broadcast Receiver registering Location Listener problem

2011-01-05 Thread Mark Murphy
On Wed, Jan 5, 2011 at 5:13 PM, Raj rnmalho...@gmail.com wrote: I am trying to write a simple receiver that will receive the BOOT_COMPLETED broadcast, and in turn register a location change listener. I know the receiver is transient, and has a short lifespan. Once the receiver dies, will my

Re: [android-developers] Broadcast Receiver registering Location Listener problem

2011-01-05 Thread Raj
Mark, Once again, thanks for an informative response. I will try the AlarmManager route, while I eagerly await your service. On the manifest question, everytime I load my application on the emulator, I get a No Launcher activity found! on the console. Is this normal? Thanks again. Best

Re: [android-developers] Broadcast Receiver registering Location Listener problem

2011-01-05 Thread Mark Murphy
On Wed, Jan 5, 2011 at 5:25 PM, Raj rnmalho...@gmail.com wrote:     Once again, thanks for an informative response. I will try the AlarmManager route, while I eagerly await your service. Keep tabs on my blog. On the manifest question, everytime I load my application on the emulator, I get a

[android-developers] Broadcast receiver won't receive camera event!

2011-01-04 Thread androidman
Hi, I'm trying to make an app that detects when a user takes a photo. I set up a broadcast receiver class and registered it in the manifest file by: receiver android:name=photoReceiver intent-filter action android:name=com.android.camera.NEW_PICTURE/ data android:mimeType=image/*/

[android-developers] broadcast receiver priority question

2010-10-24 Thread kevindroid
the symptom: I have a broadcast receiver that listen to sms, when a sms is received, i call an activity to display. It works all fine if the screen is on and not locked. But when screen is locked, and as soon as i received the sms, the activity popup for a second then disappeared. and I use the

[android-developers] broadcast receiver issue

2010-07-23 Thread Sandeep
Hi All, I am working on one project where i am using broadcast receiver in one of my activity to capture the incomming call and its works fine. when one of my other activity is open and that time if call is come then my broadcast receiver is fail to respond. can any one help me for this ? or its

[android-developers] Broadcast receiver, service thread

2010-06-23 Thread Federico Paolinelli
Hi all, I am starting to develop a new app and I am a bit confused about the structure I need to give it. I need to react to broadcast intents, so I placed a broadcast received in the manifest. Every single intent produces an action to be performed. Now the first question: should I start a

Re: [android-developers] Broadcast receiver, service thread

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 6:50 PM, Federico Paolinelli fedep...@gmail.com wrote: Every single intent produces an action to be performed. Now the first question: should I start a service (maybe with non_sticky option?) or should I start a thread (or an async task) directly from the broadcast

[android-developers] Broadcast Receiver that will be invoked when user clicks on any application icon.

2010-03-18 Thread mike
hai every one, i have a query. how can i write a Broadcast Receiver that will be invoked when user clicks on any application icon. i tried by writing receiver android:name = myreceiver intent-filter action android:name = android.intent.action.MAIN /intent-filter /receiver but it is

Re: [android-developers] Broadcast Receiver / Service will only restart my activity once.

2010-03-18 Thread Hong
I'm running into the same problem, process is bad error! No way to recover? On Wed, Mar 17, 2010 at 4:30 PM, AuxOne tyler.thack...@gmail.com wrote: I have a single Activity application, within it I have a service which creates an AlarmManager and sends a broadcast to a broadcast Receiver. If

[android-developers] Broadcast Receiver / Service will only restart my activity once.

2010-03-17 Thread AuxOne
I have a single Activity application, within it I have a service which creates an AlarmManager and sends a broadcast to a broadcast Receiver. If the activity which starts the services dies, (ie. divide by zero), the broadcast receiver stops the old service which created the AlarmManager. It works

[android-developers] Broadcast Receiver without Activity.

2010-02-12 Thread askPrins
A WAP PUSH (Broadcast)receiver basically doesn't need any UI. It is a silence application which handles the Push messages based on actions/ mimetype without needing any intreaction with user, I've tried to test it in a SMS receiver by removing the Activity from the project and it stopped receiving

Re: [android-developers] Broadcast Receiver without Activity.

2010-02-12 Thread Rogério de Souza Moraes
Hi askPrins, you can implement this using a service class instead of an activity class. So you don't need the UI. Regards, Rogerio 2010/2/12 askPrins askpr...@gmail.com A WAP PUSH (Broadcast)receiver basically doesn't need any UI. It is a silence application which handles the Push messages

Re: [android-developers] Broadcast Receiver without Activity.

2010-02-12 Thread Mark Murphy
A WAP PUSH (Broadcast)receiver basically doesn't need any UI. It is a silence application which handles the Push messages based on actions/ mimetype without needing any intreaction with user, I've tried to test it in a SMS receiver by removing the Activity from the project and it stopped

[android-developers] Broadcast Receiver and Remote Service

2010-01-20 Thread Natalie
Hi everyone, I'm hoping to do some audio processing in a remote service (service I've spawned onto its own thread); this will basically occur in a while (1) loop - so constant processing. Occasionally I want to provide some information back to the activity that is bound to the service; I'm doing

Re: [android-developers] Broadcast Receiver and Remote Service

2010-01-20 Thread Kevin Duffey
I am not entirely sure if I understand.. but is it possible when you raise the alert dialog, it's a different activity and that may be why it seems it's not working? Maybe you have to do something in the alert dialog... or maybe it blocks the main activity thread and that is why? On Wed, Jan 20,

[android-developers] Broadcast Receiver works sometimes/sometimes not.

2010-01-06 Thread Android Development
Hello, I wish to listen to android.intent.action.BOOT_COMPLETED. However i am not getting the broadcast intent, if i specify com.test.BootBroadcastReceiver in the manifest. When i change this value to simply BootBroadcastReceiver, then i am getting the broadcast intent. receiver

[android-developers] Broadcast receiver for ACTION_UP of the camera button

2010-01-06 Thread pablo
Hi Samsung Galaxy, Android 1.5. I'm trying to detect when the user releases the camera button. I have a receiver that gets the ACTION_CAMERA_BUTTON intent and examines the EXTRA_KEY_EVENT that comes with it,using the following code (in the onReceive() in the receiver) @Override public void

[android-developers] Broadcast Receiver not getting called when expected

2009-12-27 Thread Albert
Hi everyone, I have a service that gets updated every x minutes depending on the user preferences. This service connects to a web service and pulls some data. If during an update the user has no connection I register my receiver and start listening for changes

[android-developers] Broadcast Receiver From Widget

2009-12-02 Thread Henry S.
Hi, I am making a widget that needs a broadcast receiver, like the one in com.example.android.apis.appwidget.ExampleBroadcastReceiver. However, the example defines Intent.ACTION_TIMEZONE_CHANGED in the manifest, but there are some that do not allow this For example, Intent.ACTION_TIME_TICK says

Re: [android-developers] Broadcast Receiver From Widget

2009-12-02 Thread Dianne Hackborn
You simply can not do this. A BroadcastReceiver component only lives for the duration of the call to onReceiveIntent(); it is not allowed to use registerReceiver in it, because by the time you return from that method (at which point you could first receive anything from your register), the

Re: [android-developers] Broadcast Receiver From Widget

2009-12-02 Thread Dianne Hackborn
Oh and please keep in mind -- app widgets were very deliberately designed to work this way because on the vast majority of Android devices there is just not nearly enough memory to be able to run at the same time all of the widget users have placed on their home screen. You need to take care in

[android-developers] Broadcast receiver

2009-11-15 Thread Paul Townsend
Hi I am having trouble with broadcast receivers, I want to use the media_button broadcast so I can call a method on my service, I have tried putting the receiver inside the service class so I can call the method but that just says that the receiver is enclosed, but not static. If I create a new

Re: [android-developers] Broadcast receiver

2009-11-15 Thread Mark Murphy
Paul Townsend wrote: Hi I am having trouble with broadcast receivers, I want to use the media_button broadcast so I can call a method on my service, I have tried putting the receiver inside the service class so I can call the method but that just says that the receiver is enclosed, but not

Re: [android-developers] Broadcast receiver

2009-11-15 Thread Paul Townsend
Edit: Just thought I could use an Intent to the service and it will go through the onstart() etc... so I can do what I need but what if I needed to do the same in the activity as that dosen't have the same thing. 2009/11/15 Paul Townsend deer...@googlemail.com Hi I am having trouble with

Re: [android-developers] Broadcast receiver

2009-11-15 Thread Paul Townsend
Ahh thats not the way the samples do it, that kinda looks more right too, I will try that. 2009/11/15 Mark Murphy mmur...@commonsware.com Paul Townsend wrote: Hi I am having trouble with broadcast receivers, I want to use the media_button broadcast so I can call a method on my service, I

Re: [android-developers] Broadcast receiver

2009-11-15 Thread Paul Townsend
Cheers thx m8 got it working :) 2009/11/15 Paul Townsend deer...@googlemail.com Ahh thats not the way the samples do it, that kinda looks more right too, I will try that. 2009/11/15 Mark Murphy mmur...@commonsware.com Paul Townsend wrote: Hi I am having trouble with broadcast receivers,

[android-developers] broadcast Receiver for action android.intent.action.MAIN

2009-10-03 Thread jonathan.duty
I was wondering if its possible to have a broadcast receiver to listen when the app its in launches. I tried doing by creating a BroadcastReceiver to listen for the android.intent.action.MAIN action but it never gets called? Is there something I need to do or a different action I should be

[android-developers] Broadcast receiver

2009-09-28 Thread richarth
Hi, I'm trying to create a broadcast receiver which responds to system events and change system settings. I don't need any interaction from the user so I don't need an activity and have been trying to do everything through the manifest file. I've put a log event into my onReceive method but it

[android-developers] Broadcast receiver thread

2009-05-08 Thread vish74
Hi, I wanted to know if the boradcast receiver for an app runs in the same thread as the app (main thread) or in its own thread. More specifically, if my application provides a Handler() method and receiver does a sendMessage()... will all of this work part of the same thread?