Android :: Broadcast Event / Android Intent Action

Mar 25, 2010

I added broadcast listener "BATTERY_CHANGED" to Android Manifest file so that when the status changed I should get informed. I am adding to Android Manifest file as I want it active through my application life time. But the problem is that I am not getting the broad cast event from the system when battery status changes.

My code is here :-
<receiver android:name=".MyBroadcastReceiver" android:enabled="true"
android:permission="android.permission.BROADCAST_STICKY">
<intent-filter>
<action android:name="android.intent.action.BATTERY_CHANGED" />
</intent-filter> </receiver>
<uses-permission android:name="android.permission.BATTERY_STATS"/>
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>

Android :: Broadcast event / Android Intent Action


Android :: Catch.intent.action.ACTION UMS CONNECTED Event

Nov 3, 2010

I want to show some notification when android phone is connected to system. I implemented BroadcastReceiver for listening to event android.intent.action.ACTION_UMS_CONNECTED in my application But it is not working. Is it possible to capture this event.

View 3 Replies View Related

Android :: Broadcast Receiver For Action

Oct 3, 2009

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 listening for?

View 3 Replies View Related

Android :: Recieve Broadcast Action In An Activity?

Feb 14, 2010

Can I receive a broadcast event in an activity? I've seen this done in broadcast receivers but not in an activity. In particular I would like to receive an event when a bluetooth device is found. ACTION_DISCOVERY_FINISHED.

Do I need to declare that in the activity intent filters? Should I be using permissions for that? How do I define the callback to handle that in the activity when i get receive the action?

View 2 Replies View Related

Android :: Receive An Event Via Broadcast?

Nov 9, 2010

Is there any way to receive an event via a broadcast or any other way when new activity starts or any task in android?

View 1 Replies View Related

Android :: Intent.action.ANSWER

Feb 2, 2010

I am using android.intent.action.ANSWER for receiving my call (android_OS). below i m giving code segment i used:

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

in activity class i wrote

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

But i did not get any result. see my code and give me a feedback.

View 2 Replies View Related

Android :: Intent Call Action

Jan 7, 2010

How to invoke call in android using ntent?...

View 2 Replies View Related

Android :: Send Data Packets Out After Broadcast Event Received

May 27, 2010

I know that the apps receive a ACTION_SHUTDOWN broadcast event when the device is shutting down.
When an application receives the shutdown, is there still an opportunity to send data packets out, or does android block such attempts(or does the platform tear down the network stack before it can go out).

View 1 Replies View Related

Android :: Broadcast Intent For USB Power?

Feb 20, 2010

Is there a Broadcast Intent that gets sent out when the device is plugged in for power? I want to create a BroadcastReceiver to detect the device's plugged in state.

I've looked everywhere in the Developer's resources and reference, but I can't find anything that resembles what I'm trying to do.

View 4 Replies View Related

Android :: Intent.action.TIME TICK

Apr 1, 2009

I'm trying to get an application / reciever / anything that can perform a task once every minute. I'm trying to use the intent-filter "android.intent.action.TIME_TICK" which, in theory, sends an Intent message every minute.

Does anyone have any code that uses the android.intent.action.TIME_TICK intent? I can't seem to get it to send the intent to my application and I can't find anything much on the internet. Has anyone used it successfully?

I have a manifest.xml as below.

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

View 2 Replies View Related

Android :: Way To Broadcast Any Intent As New Email Received?

Jul 28, 2010

Do any one know how to broadcast any intent if new email is received?

View 8 Replies View Related

Android :: Start Another Activity With Broadcast Intent

Nov 29, 2009

I'm trying to start an activity out of a widget so I can't use the startActivity() function. So I'm trying to create the correct intent but I don't find what I'm missing.

View 2 Replies View Related

Android :: Create A New Intent For Another App's Broadcast Receiver?

Jul 23, 2010

In the examples, they create Intent as:

Intent intent = new Intent(this, AlarmReceiver.class);

But suppose my AlarmReceiver class is in another app, how do I create this intent?

I've tried with

new Intent("com.app.AlarmReceiver")

but nothing happens.. It was not called..

--Broadcast definition added using the manifest editor on Eclipse:

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

View 1 Replies View Related

Android :: How To Broadcast Intent From Native Code

Nov 2, 2010

Is it possible to broadcast an Intent from native code? If so, is there documentation and/or sample code pertaining to the relevant APIs?

View 1 Replies View Related

Android :: Way To Determine Sender Of Broadcast Intent

Sep 20, 2010

I have an application that is at the same time a broadcast sender and receiver of standard action android.intent.action.SET_WALLPAPER. I want to do some stuff only in a case when another application broadcasted this intent.

Is there any way to determine who initiated a broadcast in onReceive method of a BroadcastReceiver?

View 1 Replies View Related

Android :: Sending Broadcast Intent From Runnable

Jul 10, 2010

I want to send a broadcast from a new thread is start.

This is what i tried:

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

But ofcourse i need context..this won't work. How can i handle this.

View 1 Replies View Related

Android :: Creating Intent With Action / Any Way To Filter Results

Jul 20, 2010

When creating an intent with action send to send some data, is there a way to filter the results that are included in the activity chooser that is created using Intent.createChooser? I have not seen a way to do this other than setting the mime type, but it is not flexible enough.

For example, there is a situation when I want e-mail apps to be the only results in the activity chooser dialog. Setting the type to "text/ html" successfully filters this down to email apps, except when bluetooth is enabled. Bluetooth appears in the list as well, but this is not desirable. Surely there is a way to have a little more control over the results?

View 3 Replies View Related

Android :: Catch .intent.action. Media Mounted

Oct 28, 2010

How to cath android.intent.action.MEDIA_MOUNTED event I implemented an broadcast receiver to invoke when sdcard is mounted. But it is not invoked

My source code is as follows:

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

View 3 Replies View Related

Android :: Intent.action.NOTIFICATION REMOVE Not Available On All Devices

Nov 12, 2010

I've got a receiver set up in my android application to catch android.intent.action.NOTIFICATION_REMOVE intents. On my Evo, it works fine - when a notification is cleared from the notification bar, I catch that event and can run some code. I tried running this on a Samsung Moment though, and it is never caught. So now I'm trying to figure out why, and I can't seem to find anything on Google about this intent action - and I set this code up a few months ago, so I don't remember where I even found this action, it doesn't seem to be in the API.

The evo is running 2.2, and the moment is running 2.1-update1, so I'm guessing that it's undocumented, and only available in 2.2. Is there any other way to catch an event that a notification has been cleared? Note that I'm not trying to cancel a notification that I put up, or trying to cancel another app's notification, just catch an event when a notification has been cleared.

Here's my receiver in AndroidManafest.xml:

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

View 3 Replies View Related

Android :: Register .intent.action.SEND In Service

Apr 26, 2010

I want to receive Intent "android.intent.action.SEND" in a Service. Is it possilbe to register for this Intent via registerReceiver() and get the Intent in Broadcast receiver in the Service?

Or is there any restrictions that "android.intent.action.SEND" can only be registered via Manifest.xml of an Activity and not in a Service?

View 2 Replies View Related

Android :: What Is Intent Action Name To Launch Native Map Appl?

Apr 20, 2009

what is intent action name(e.g. action name "android.media.action.IMAGE_CAPTURE" for launching camera appl) to launch the native map appl Is there intent available(documented or undocumented since above intent of capturing image is undocumented ) for launching maps appl?

I know one for launching maps for driving direction "this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps? f=d&saddr=37.4,-121.9"+ "&daddr=Bellevue, WA&hl=en")));" but this goes to driving direction page of maps appl.

is there any way to launch maps appl which will open maps home page?

View 3 Replies View Related

Android :: Catching An Action Without Setting An Intent Filter?

Jan 11, 2010

I'm trying to catch an action like ACTION_HEADSET_PLUG. But I think it might be too much to set this action on the manifest file.

How could I register a listener for this action? I only need to care about it when my application is running not all the time as I think it would happen when registering it under the manifest file...

View 4 Replies View Related

Android :: Sending / Receiving Custom Broadcast Intent

Jul 25, 2009

I'm building a service that sends a broadcast intent when some value changes. The service sends the broadcast like this:

Intent broadcastIntent = new Intent(); broadcastIntent.setAction("nl.vu.contextframework.NEWREADING"); broadcastIntent.setData(Uri.parse("context://"+cer.getKey())); broadcastIntent.putExtra("reading",cer); broadcastIntent.addCategory("nl.vu.contextframework.CONTEXT"); sendBroadcast(broadcastIntent);

In some Activity (in a different process), I'm tryint to receive this broadcast as follows:

IntentFilter intentFilter = new IntentFilter();
intentFilter.addDataScheme("context");
intentFilter.addCategory(CATEGORY_CONTEXT);
registerReceiver(new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
Log.d(TAG,"Received intent "+intent); }
}, intentFilter);

View 6 Replies View Related

Android :: How Broadcast Receiver And Intent Filter Behaves?

Jul 6, 2010

I am new to android platform.please help me out how the Broadcast Receiver and Intent Filter behaves in android.please explain in simple line or with example.

View 1 Replies View Related

Android :: Run Multiple Broadcast Receivers For Same Intent In Same Application?

Oct 25, 2010

I'm working on a project where I need to run the BroadcastReceiver for a third party library for a specific Intent. I also want to run some of my own code when the Intent is broadcast. If I supply my own BroadcastReceiver for the same Intent, it seems that only, one or the other runs, but not both, depending on which appears first in the AndroidManifest.xml file. Is it possible to register multiple BroadcastReceivers for the same Intent in the same application and have them all run? AndroidManifest.xml snippet

View 4 Replies View Related

Android :: Broadcast Intent When Network State Has Changend

Apr 20, 2010

Does Android broadcast an intent when the network state has changend, i.e. from GSM to Wifi? And if so what permission do I need and what is the intent action called?

View 3 Replies View Related

Android :: How To Capture Key Events From Intent's / Broadcast Receivers?

Oct 29, 2010

Is there a way to capture a key event from the Menu button using an Intent or Broadcast Receiver? Basically I want my app's Service to be activated when the Menu key is pressed.

View 1 Replies View Related

Android :: Taking Picture By Camera Correct Intent Action

Mar 3, 2009

I am trying to take picture by G1 camera.

I have tried almost everything i was able to find on the net about this topic. It seams there should be intent with action "android.media.action.IMAGE_CAPTURE" which really starts camera application and returns captured image. But captured image is scaled to 0.25 of original size. Another possibility I have found is to pass uri where to save captured image. I went through all available sources of camera application and it should work but does not.

For illustration, I am doing following in my example activity which creates new image, but after returning from camera, image is still empty:

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

I am ready to write my own capturing application, but it is quite hard and I would like to reuse.

Do you know correct intent action name and extra name to pass to capture image?

View 4 Replies View Related

Android :: Unable To Launch An Activity Using Implicit Intent Specifying Only Action

Mar 5, 2010

I am trying to launch an activity by specifying only its action(custom) defined in its intent filter from an activity in other application. The activity to be launched is the main activity of its application thus have android.intent.action.MAIN & android.intent.category.LAUNCHER set as action and category in its intent filter. Now according to android doc on Intent and Intent Filter, i do not need to specify DEFAULT category at all in this case. But doing the same i am i am unable to launch the activity.

LogCat says, Activity could not be found...

Am i misinterpreting the text or is there something else missing...?

Code, used for calling the activity

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

Definition of Activity being called in the manifest file

COE:....................

View 1 Replies View Related

Android :: Implicit Intent - Same Action For Mutiple Component How It Works

Sep 7, 2010

I couldnt figure out the exact understanding of implicit intents.

When i was going through the tutorial i read about it.

Here are some important points to remember: 1 - Implicit Intents do not specify a target component 2 - Components willing to receive implicit intents have to declare their ability to handle a specific intent by declaring intent filters 3 - A component can declare any number of Intent Filters 4 - There can be more than one component that declares the same Intent Filters and hence can respond to the same implicit intent. In that case the user is presented both the component options and he can choose which one he wants to continue with 5- You can set priorities for the intent filters to ensure the order of responses.

I read this about Implicit Intents.

I couldnt get visualisation of 4th point. So wanted to try it out by writing some examples.

I tested this like below. Wrote two apps.

I had written two activities in one app, CallingActivity & anotherActivity.

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

One more app,which has two activities like below.

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

I ran the first app in emulator and pressed home screen, it mean it runs in the background.(Not exited ) Then i opened the second app and clicked a button in frirst activity(testmain) and tried to call setAction "com.android.localguide.GET_RESULT"

i.setAction("com.android.localguide.GET_RESULT");

But it is opening the activity "results".. It dint showed a options to choose which components( i expected first app ) activity i need to use ?

Am i right in executing in the right context to understand that point no 4 ?

View 3 Replies View Related







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