Android :: Targeting Broadcasts To Specific Receiver
Jul 3, 2009
I am trying to get the intent "android.intent.action.BOOT_COMPLETED" sent only to the receiver "com.android.mms.transaction.MmsSystemEventReceiver" as this triggers the sms notification to be updated and removed if there is no longer any unread sms's. The issue I have is I need to make sure the broadcast is only sent to the class above. If it goes to other receivers the phone could end up in an unknown state or something strange. The code below does not seem to work.
Intent intent = new Intent(); intent.setAction("android.intent.action.BOOT_COMPLETED");
intent.setClassName("com.android.mms", ".transaction.MmsSystemEventReceiver");
activity.sendBroadcast(intent);
This code does work but since it goes to all receivers I have noticed some errors starting to show up in logs etc.
Intent intent = new Intent();
intent.setAction("android.intent.action.BOOT_COMPLETED");
activity.sendBroadcast(intent);
View 7 Replies
Jul 5, 2010
App A has this Broadcast Receiver in its manifest (within <application>): Code...
View 1 Replies
View Related
Aug 12, 2010
I need to target apps for a specific carrier. Any tips on how to do this? I've seen <uses-library> for market filtering, but looking for something else.
View 3 Replies
View Related
Oct 28, 2010
I read here: http://www.androidguys.com/2009/10/11/developers-can-now-target-by-carrier-in-android-market/ that it can be done if you go to the Android Market, and go to your app, then go to Publishing Options -> Locations, but I don't see anything to select a specific carrier there, only specific countries. Is this something that Google changed? Can this still be done, or is it done automatically? Can't the carrier be detected from the device?
View 1 Replies
View Related
Oct 29, 2009
I'm interested in learning Android development but if I install the latest 2.0 SDK, will I still be able to target 1.5 and 1.6 devices? (since there is only one 2.0 device right now)
Basically I'm wondering if it will tell me if I'm doing something that won't work on older versions of the OS.
View 2 Replies
View Related
Jan 21, 2010
I'm building an application, and need to support both 1.5 (Magic and Hero) and 1.6 (Tattoo) devices.
As Android SDK is forward compatible, it seemed logical to build against Android 1.5 SDK, and expect application to work on Tattoo. While that's true, (I tested app, it works ok), I'm now having problems on Android Market. On Tattoo, Market search by default filters android apps that doesn't have explicit support for small screens defined in AndroidManifest. Problem is that attribute exists only on Android 1.6 SDK, so Building against Android 1.5 SDK is no an option anymore. How safe is to build App agains A1.6 (with minSdkVersion="3") and run it on 1.5 devices? Is there anything else I should take care of except just change target SDK?
View 1 Replies
View Related
Nov 17, 2009
We are upgrading our application to add 2.0 support. I have read http://developer.android.com/guide/appendix/api-levels.html and the older blog post http://android-developers.blogspot.com/2009/04/backward-compatibility.... I want to avoid using reflection if possible. I have found that if I set my minSdkVersion="3" in the application manifest but in my build path in eclipse point to the Adroid 2.0 jar file I can compile with direct calls to 2.0 code (with the relevant code to ensure they are not invoked on <2.0 devices). My question is will people with pre 2.0 devices be able to see the application in the market place in this case? What are other people using for multi-targeting different API levels with the same package.
View 7 Replies
View Related
Jan 6, 2010
I'm trying to get rid of the mentioned (READ_PHONE_STATE and WRITE_EXTERNAL_STORAGE) auto-permissions in my signed apk, but I can't. I know it is an issue with targeting 1.5, but this isn't my case. I'm targeting >=1.6. I've checked everything: In my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.aaa.bbb"
android:versionCode="1" android:versionName="1.0.0">
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4" />
Eclipse generates the proper value in default.properties: target=android-4
View 3 Replies
View Related
May 16, 2009
I want to know whenever someone is called, calls, smsed or smses. I figured for the calls I'd use the phone state change to trigger when I should check the CallLog provider again. I couldn't see any direct way of getting broadcasts from the CallLog. Did I miss it?
For SMSes I'm having more trouble. I'd like to know whenever and SMS is sent or received. Being able to receive STATUS_ON_SIM_READ and STATUS_ON_SIM_SENT would be great, but from what I've read in the Sms Manager that would depend on the sending application. I can't seem to find any evidence of a default one that android places when it sends. I also couldn't find an sms log provider or anything similar.
View 2 Replies
View Related
Feb 3, 2009
Last week I published our first app to the Market, which is a game targeted to users in The Netherlands. Now that the G1 has been available over here for a couple of days, we have received feedback from several of our users. When I look at the developers console in the market however, the download count still shows 0.
Also on the device it is listed as <50. When looking around in the Market, I see that all applications targeted to The Netherlands are listed as having <50 downloads, even an application that received a lot of publicity. Have other developers noticed the same?
View 14 Replies
View Related
Oct 6, 2010
I'm beginning with Android development. I'm aware that there is a lot of Android devices still on OS 1.5 or 1.6 so I'm thinking about require API level 3 as minimum to support them. What will I miss from 2.2? Which are the most important features I will miss targeting Android API 3 (OS 1.5) instead of most recent API?
View 3 Replies
View Related
Jul 17, 2009
How can I catch SCREEN_ON/SCREEN_OFF broadcasts? I have tried for hours, but failed.
View 10 Replies
View Related
Aug 10, 2009
I have started developing a tool, which should react on an outgoing call or sms and also to be started at boot time. The start at boot time does work properly, but I'm not able to receive the broadcasts for the outgoing calls.
Who can tell me, what is wrong with my code? For this, I added two receivers in my manifest and implemented the broadcast receivers:
manifest.xml: <receiver android:enabled="true" android:name=".BootUpReceiver"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver>
<receiver android:name=".TelephoneViewer" android:enabled="true" android:exported="true"
android:permission=""> <intent-filter> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
<action android:name="android.intent.action.PHONE_STATE" />
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter> </receiver>
TelephoneViewer.java: public class TelephoneViewer extends BroadcastReceiver {
@Override public void onReceive(Context context, Intent intent) {
Log.d(this.getClass().getSimpleName(), "Telephoneviewer.onReceive()");
Toast.makeText(context,"TelephoneViewer.onReceive()", Toast.LENGTH_SHORT).show(); }
View 4 Replies
View Related
Sep 15, 2010
I have two applications, one of which (B) implements a broadcast receiver. The application (A) which sends the broadcast, binds a permission to it which the receiver (B) shall possess. The problem is now: If I install the receiver (B) first and the sender (A) afterwards, the receiver will never receive the broadcast. I assume this happens because the installation of the receiver somewhere fails when it comes to the "uses permission" part of the manifest (because this permission is not yet registered/defined).
However, this issue should be resolved as soon as the sender (which defines the permission in the manifest) is installed, but unfortunately isn't. It does not even help to re-install the receiver. The only way to resolve the issue is to completely uninstall the receiver application and do a fresh install. Is this behaviour intended ("not a bug, a feature")?
View 3 Replies
View Related
Feb 11, 2009
Does the Alarm Clock broadcast any intents? I would like to be able to have my application automatically launch after a person's alarm clock goes off, and they press "dismiss" (rather than "sleep"). I assume that would require a receiver looking for a broadcast of some kind.
View 2 Replies
View Related
Oct 20, 2009
I am trying to register a Broadcast Receiver to receive broadcast events for the package events. Following is the code and my receiver in the manifest file. The log statment never happens, but I can clearly see the same broadcast firing for "HomeLoaders" (the Launcher) debug statements.
public class IntentListener extends BroadcastReceiver {
@Override public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
Log.i("INTENT LISTNER:", intent.getAction()); } }
<receiver android:name="IntentListener" android:enabled="true" android:exported="true">
<intent-filter> <data android:scheme="package"></data>
<action android:name="android.intent.action.PACKAGE_ADDED"></action>
<action android:name="android.intent.action.PACKAGE_ADDED"></action>
<action android:name="android.intent.action.PACKAGE_CHANGED"></action>
</intent-filter> </receiver>
View 1 Replies
View Related
Sep 28, 2009
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 never logs anything so I'm presuming my method is never called. I've tried this with both the 1.5 and 1.6 SDKs. I was hoping somebody could have a look at my code please and let me know if there are any problems.
View 2 Replies
View Related
Jul 19, 2010
I have the following broadcast receiver:
public class MyRingModeReceiver extends BroadcastReceiver {
@Override public void onReceive(Context context, Intent intent) {
Logger.iLog("In my Receiver"); } }
I then have a service that onCreate does the following:
IntentFilter filter = new IntentFilter();
filter.addAction("android.media.RINGER_MODE_CHANGED");
registerReceiver(new MyRingModeReceiver() , filter);
When I place a call to the emulator and use the volume keys to modify (silence) the ringer
nothing happens.
View 1 Replies
View Related
Apr 2, 2010
We are designing a system with a PC base station and 100 Android mobiles communicating over WiFi. They will use XLM-RPC as the method of mobile to base station communication. However, sometimes the base station needs to broadcast a message to all mobiles. Should we use "http server push" for this, i.e., have the base station leave the connections open to all the mobiles? Is there a better way? Publish-subscribe is possible, but doesn't seem mature on Android yet.
View 1 Replies
View Related
Apr 15, 2009
I have custom view and once some action occur in it (say touch/key event) I'd like to call some code in my activity. My question is if broadcasts (intent filters/broadcast receivers) are good communication mechanism for such thing? If not, what is normal/android preferred way to do it?
View 5 Replies
View Related
Jun 18, 2010
I am 6 months experience in Android, use to develop simple UI based application. Now i want to write application targeting the Android core Kernel.For example i want to develop a Framework which is not present in Android.To achieve that we have to write the code for the Kernel. I dont know where and how to start the Android Kernel Programming. If anybody knows the way to start it.
View 3 Replies
View Related
May 15, 2010
I have two BroadcastReceiver registered. When the app is closed they both fire at the appropriate times and do the appropriate things. If the app is closed then killed (say with an AppKiller), the receivers never receive their broadcasts, and nothing happens. Presumably the same thing happens if the parent app is killed due to low memory, so how do I ensure those broadcasts are fired/received. The API states that even if the app is killed it should fire, does anyone else have experience with this situation? If it helps my manifest is:
<!-- receivers for AlarmManager -->
<receiver android:exported="true" android:label="Shift roster updating calendar."
android:name="com.skooter.shiftroster.backend.service.UpdateCalendar" >
</receiver> <receiver android:exported="true" android:label="Shift roster checking alarm."
android:name="com.skooter.shiftroster.backend.service.SetWakeup" >
</receiver>
and nothing esoteric is going on in the AlarmManager/BroadcastReceivers
View 1 Replies
View Related
May 31, 2010
Just picked up my incredible, and I have two questions....
1. how do i change the email notification to a specific sound? As of rite now, when i receive an email nothing happens (no sound or vibrate).
2. How do I select a specific ring for mms. I know how to select sms, but I cant figure out how to change the mms.
View 3 Replies
View Related
Mar 12, 2014
I have had androids for over two years now and am getting more and more concerned every time I download an app and seeing that it wants to READ my SMS message and Contacts.
Is there a way I can disable reading of SMS messages or any one of the other permissions by specific apps, or all apps?
Are we living in a world where any "joe schmo" can upload an app the to the app store and wait for those inadvertent downloads and collect all your personal information, and that's after all the time we spend protecting our identity and personal details?
View 2 Replies
View Related
Aug 16, 2009
How much accurate are the coordinates received by the GPS antenna in the reality?I'm using the emulator but it doesn't work well with coordinates too much close is there nobody that have tested an application based on the package "Location" in a real device(I don't have a real one yet..) and knows how to answer me?
View 7 Replies
View Related
Jul 3, 2010
Can Android use Bluetooth GPS Receivers in its various applications, such as MyTracks, CardioTrainer, Google Maps etc, is there an app I can install to allow this, or does the functionality have to be supported by the relevent software application (MyTracks, GoogleMaps etc) itself.If the latter, are there any navigation programs I can install which support this?
View 1 Replies
View Related
Mar 18, 2010
Hi we get an event when new sms come in android but can we get any event when user send a messages, in short is there any receiver to track sending sms as we track incoming sms.
View 1 Replies
View Related
Dec 22, 2009
I'm trying to write a simple application that attempts to receive SMS messages and handle them. I've followed several tutorials but I'm getting nowhere, when I send a SMS to the emulator, the Intent never seems to get fired.I'd really appreciate some guidance with what's going wrong. I'm just getting into Android development but I think I have my head wrapped around (most of) it. While monitoring the emulator's logcat, the log events never come up, and debugging breakpoints are never hit, so I have a feeling it's somewhere in my intent filter.
View 4 Replies
View Related
Aug 31, 2010
I am having an inner class which extends BroadcastReceiver.But I am getting error Unable to instantiate receiver org.example.test.OuterClass$InnerClass.
View 2 Replies
View Related
Jun 28, 2009
I have found the solution to this problem, the issue was I was also supposed to add the data tag:<data android:mimeType="application/vnd.wap.mms-message" />.Can someone provide some sample code to access the contents of the MMS message received.
View 2 Replies
View Related