Android :: Broadcasts Receivers And Permissions In Two Applications?
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
Aug 18, 2010
Why do apps always seem to ask for so many permissions when downloading, I wanted to download a news reader but it wanted access to calls too. Is this normal?
View 2 Replies
View Related
Aug 2, 2010
There are so many apps in the market and I don't trust all of them. Is there a way to remove some permissions of the already compiled APK? It doesn't matter if I cannot sign it anymore with the original certificate of the developer. And is there also a way to add an error-handler into the .apk-file, so that the errors of the requested permissions will also be suppressed?
View 3 Replies
View Related
Oct 7, 2010
When installing applications from android market some permissions are not listed to the user, but are granted to the application upon installation, including the notorious "Phone calls" permission. When installing locally through "Package installer" the full set of permissions is listed. That behavior may be observed with many applications one of which is 'net.jimblackler.newswidget' (no offense Jim - I hope it's true there's no bad publicity).
This bug was reported as issue #9365 [0] back in Jun 27, 2010 but has gone so far unnoticed, perhaps because android market is not part of AOSP, which is why I post here. I consider this a serious problem as it is misleading for users and reflects badly on application developers and the whole android echo system. Hopefully this will get the needed attention and treatment, especially after all the recent noise around applications security and privacy breaches.
[0] http://code.google.com/p/android/issues/detail?id=9365
View 2 Replies
View Related
Mar 4, 2010
Only when i try to post a status, i get this message. Not on comments just on my main update status. i didnt install anything new and ive had this error a few days now. i tried uninstalling and reinstalling the app and nothing seems to be changing. im runnung BB0 0.7.5 if it matters and have been for a long time. i havent dont anything new with my phone...
View 1 Replies
View Related
Mar 26, 2010
I was messing around with my phone being bored and went into the superuser permissions app. I was looking at all the entries that were in there and I know that it's just a list of permissions you've allowed on your phone. Anyway I wanted to see what would happen if I clicked on one of them. Well it cleared it from the list and I just clicked on all of them so when I'm in the SU app there is nothing there. Now when I try and get into one of my apps that require permission it tells me it requires root and doesn't have permission. So it looks like I blocked all permissions for my rooted apps. The question is how do I get it back? I'm sure I can just reflash a nandroid backup I have but I was wondering if there is any other way?
View 4 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
Jul 23, 2012
The permissions say that you must agree to allow them to delete files from your storage including your SD card; must agree to allow them to extract any information from your phone, etc. In other words they can do any thing they want with your phone and the data in it.
Is there any way to not grant these permissions and still get updates?
View 2 Replies
View Related
Jul 5, 2010
App A has this Broadcast Receiver in its manifest (within <application>): Code...
View 1 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
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
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
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
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
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
Sep 9, 2009
I had one question: Is it feasible to use a BroadcastReceiver as a glue layer between the user interface and the underlying business logic ? Example use case: Suppose i am maintaining the state of a call, and providing callbacks to the UI by invoking sendBroadcast with the relevant intent. Similarly, my underlying business logic can send broadcasts to the activity that has registered for receiving it on certain events ( like call connected, connecting, timed out etc).
View 4 Replies
View Related
Dec 30, 2009
Is it possible to use just a broadcast receiver without any activities? I just want to run some sample code only when the phone receives a call and nothing more. I use Log.d to write out but I don't see anything in the log. Am I missing something here? I also have permissions set in the androidmanifest.xml to allow for these type of intents.
View 3 Replies
View Related
Mar 16, 2010
something weird just started happening. my app has a broadcast receiver which may access the network when invoked. the code has been solid for ages, but in the last few days it has started getting DNS errors on perfectly fine hosts. these are hosts which can be reached without problems in the main app or from other apps.interestingly i've seen another app get DNS errors too another app with a broadcast receiver.seems to affect all OS versions -- we have 1.5, 1.6, and 2.01 here. i don't have a Nexus to test 2.1, though. are there caveats to doing network inside broadcast receivers? i didn't think so, as ours worked fine until the time change [fx: twilight zone theme]
View 6 Replies
View Related
Dec 10, 2009
I think I may have found an issue within the My understanding is that to properly hold a device awake after an alarm is triggered you have to aquire a WakeLock in the onReceive() event, call a Service, then perform the work in the Service, releasing the lock within the Service when complete. http://groups.google.com/group/android-developers/ browse_ thread /threa . http://www.mail-archive.com/android-developers@ googlegroups.com/msg66. This pattern can also be found in the CommonWare Advanced Android Development book. I tried this, but I found that the AlarmManager, when calling the BroadcastReceiver, runs on a separate PID than the IntentService when started from the BroadcastReceiver's onReceive() event. This makes the static variable on the lock manager. I tried this, and my logs indicate that the PID is definately not the same, and my understanding is that the DalikVM instances act like a standard JVM, whereby objects and variables are no shared between JVMs. Furthermore, since the WakeLock is not serializable, there is really no way to pass the reference to the lock via an "extra" in the Intent.Has anyone else seen this pattern work or fail? I have an example project (with compiled APK) if you'd like to test it yourself, where shall I post this? I have tested this on the emulator on versions 1.6 and 2.0.
View 8 Replies
View Related
Aug 9, 2012
Is it possible to create a virtual TMC receiver via FM radio? On the Windows Mobile built such projects as OmniaTMC, HyperGPS. What about devices based on Android?
View 1 Replies
View Related
Apr 21, 2010
Can anyone give a hint if you know why there are some ACTIONS that do not trigger their associated receivers when they are registered in the manifest while they are received when they are register through registerReceiver() ? For instance, when I declare: <receiver android:name=".MyReceiver"> <intent-filter> <action android:name= "android.intent .action .NEW_ OUTGOING_CALL" /></intent-filter> </receiver> if the application is NOT running My Receiver is never invoked. But now, if I register the intent from inside a service, MyReceiver is invoked properly
View 2 Replies
View Related
Jul 17, 2010
im trying to understand what the difference between a service and a broadcast receiver is,as i see it they can do the same thing.For example i have an application : App1 That provide a service called ToastHelloWorld which just creates a Toast and stopSelf(). expose it to other applications using an intent filter with the action name: "com.test.HelloToast"Now i have another application : App2 i want to implicit use a service with the action "com. test. Hello Toast" so i call startService( new Intent ("com. test.HelloToast"));and it works.Why would i use broadcast receivers when i can do everything with services and dont have the restriction of a 5sec execution limit?.I know most "system events" is exposed via broadcasts' but couldnt they just aswell be published as Service Intents?
View 1 Replies
View Related
May 4, 2009
I started to implement my own App Widget using the example provided in the ApiDemos. In order to update the Widget efficiently I chose the Broadcast Receiver mechanism. In the ApiDemos there is this ExampleBroadcastReceiver which would (or should) react to changes related to TimeZone and Time as specified in the Android Manifest of the ApiDemos. I have debugged this Example using Eclipse and the Logcat output (provoking changes in TimeZone through the settings) and come to the conclusion that there must be some bug in the app widget framework. The only Broadcast Receiver that seems to work is the AppWidgetProvider itself. For instance I would expect something like: D/ExampleBroadcastReceiver intent=XY in the logcat's output after I have provoked the event XY. I have even tried without the 'enabled' option in the receiver's specification in the Android Manifest.
View 5 Replies
View Related
Jun 28, 2010
The online android documentation says: Everything you can do with AppWidgetProvider, you can do with a regular Broadcast Receiver.So, what i want to do is to register via registerReceiver() another event other than ACTION_APPWIDGET_* on my Widget. For example ACTION_BATTERY_OKAY, is there any way to do this? Obviously i cant register the event from the onUpdate() code but i should do it using a service or something else. The problem is that im not able to find any reference to the Provider (AppWidgetManager only returns AppWidgetProviderInfo objects).
View 1 Replies
View Related
Jul 2, 2010
I have a program that monitors incoming SMS's, and I want it to monitor them full-time, so I registerReceiver with a Broadcast receiver that I've created. The problem is, if I want to unregister that receiver, I can't unless I know the original Broadcast Receiver class I registered. This is not a problem if I set it to stop when the program stops, but I want the receiver to keep running, only stopping when the user specifies. EDIT: Or is there a way of "Storing" the Broadcast Receiver class that I've created, such that when onDestroy is called it can be saved and when create is called again it can be pulled out.Is there any way of doing this?
View 1 Replies
View Related
Jul 22, 2010
How to set a priority for multiple Broadcast Receivers when dealing with ordered intent broadcast?
View 7 Replies
View Related
Sep 23, 2010
I am developing an app for android mobiles that communicates with a json/rest web service. I need to make certain kinds of calls periodically to the server to check for some information. Within that context I might need also to query the GPS for the current position. I'm quite undecided to use a Local Service, since I don't know very well how to deal with them, in fact I need to retrieve those data periodically and refresh a MapView accordingly. I heard that I can use PendingIntents,in the service, associate this data as a payload and send them to a broadcast receiver which unpack the data and refresh the UI, I heard also that this is a bad design approach because of what broadcast receiver are intended to be used for.
View 1 Replies
View Related