broadcastreceiver

launching an activity from a broadcast receiver that listens to outgoing call

旧时模样 提交于 2019-12-03 14:04:20
I am trying to launch an activity from a broadcast receiver that listens to outgoing call which is 5556. The problem is, the activity is not being launched but the dial inbuilt activity is being called, I have changed the priority of the intent to 100 but to no avail. How do I get the activity to launch at dial instead of the inbuilt calling activity? Here is the code: package com.messageHider; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.Toast; public class launchReceiver extends BroadcastReceiver { @Override

Google Analytics for Android v2 Campaign Tracking Not Working

给你一囗甜甜゛ 提交于 2019-12-03 13:57:33
I have spent a ton of time on this, and am now pulling my hair out. I am using the Google Analytics Android SDK v2. I have been using it for months, and have collected data using EasyTracker . No issues there. I recently tried to implement Campaign Tracking, and everything seemed okay, but after weeks in the market even with hundreds of referral downloads, I saw no data. I recently looked into how to test it and found this: stackoverflow.com/questions/5890914/how-to-test-android-referral-tracking I am using the v2 service, so in my AndroidManifest.xml, I added this: <!-- Used for install

Android - How to detect outgoing call is answered or received?

你。 提交于 2019-12-03 13:55:26
问题 Is there any way to detect outgoing call is successfully received or answered ? I am using Intent.ACTION_CALL for dialing a call and PhoneCallListener to find the state of a call when outgoing call answered but I couldn't have been achieving this. Is this possible in android ? 回答1: After deeply working on this issue, I reached this conclusion: PhoneStateListener won't work for outgoing calls, it calls OFFHOOK instead of RINGING and OFFHOOK is never called on ANSWER. Using

Android: Querying Call Log After it has Been Updated Once a Call Ends

橙三吉。 提交于 2019-12-03 12:49:56
When a call ends, how can I be sure that I am querying the Call Log after the call information has been written to the database? I am looking for the end of a call by using a BroadcastReceiver with an intent-filter on android.intent.action.PHONE_STATE , looking for the phone to go idle . Any help on this would be appreciated. Thanks Dharmendra Here is the very very good answer. See below link Click Here When you see above example you will learn how to get call's end-state and you will also keep in mind that after call ends CALL_STATE_IDLE will calls more than once so you have to take one

Android - sendOrderedBroadcast help

放肆的年华 提交于 2019-12-03 12:46:07
I am trying to use a sendOrderedBroadcast in my Android app. I want to be able to send the Intent from one of my applications to another and I then want to get data back from the Application that recieves the Intent, in this case a boolean true or false. Here is the current code: Intent i = new Intent(); i.setAction(GlobalData.PROPOSE_IN_DOMAIN_ROAM_INTENT); i.putExtra("com.testnetworks.QCLEVEL", aProposedTheoreticalQoSLevel); sendOrderedBroadcast(i, null, null, null, Activity.RESULT_OK, null, null); Is this the correct way to achieve what I want? If so what do I use as the resultReceiver*

How to check VPN connection status on Android ICS

最后都变了- 提交于 2019-12-03 12:29:52
问题 I'm trying to register receiver, that will check VPN status. I have tried this: Get VPN Connection status on Android but looks like it no longer works on ICS. I have checked android source code for some clue, but with no luck, only noticed that in ISC there is nothing like: vpn.connectivity and connection_state - it use to be in android 2.3. Also tried using android.net.conn.CONNECTIVITY_CHANGE as my IntentFilter , but it doesn't react on VPN connection at all (of course I have added

How to get notified of each new image being visible to the gallery app?

不问归期 提交于 2019-12-03 11:55:47
问题 Background When the user downloads a new image or captures one using the camera, the gallery app will get updated to show the new images. I need to be notified of each new image as soon as it was created, no matter how it was created (camera, browser,...) , just as the gallery app shows. The problem As it turns out there is a mediaScanner Android component that is responsible for scanning all types of media files, and when it finishes, it's supposed to send an intent "MEDIA_SCANNER_FINISHED"

How to release the microphone resource when another Android app needs it?

▼魔方 西西 提交于 2019-12-03 11:53:05
I have implemented an Android background service (based in Pocket Sphinx) that continuously listens, detects and spots certain keywords when the phone's screen is on, and then reacts accordingly (for a domotic project). However, my app should always have a lower priority and I want it to release the microphone's resources when any other app needs to use it. Is there any system intent or system broadcast that I can receive when an app -wants- to use the microphone (so that my service can release it)? Or, is there a better approach or better practice? This is the log with the errors I want to

Open activity by clicking on the push notification from Parse

a 夏天 提交于 2019-12-03 11:46:42
I want to receive a push notification from Parse and open an List activity and use intent.putextra("dataFromParse") before starting the activity. I'm able to receive the push but only open the MainActivity by using this: PushService.setDefaultPushCallback(this, MainActivity.class); ParseInstallation.getCurrentInstallation().saveInBackground(); I want to have this as the default, but should also be able to start the List activity. I have also tried using a customer receiver, but then I'm only able to directly open the activity when receiving the push, not when clicking it. manifest.xml:

Android: detect when GPS is turned on/off (or when no app is using it anymore)

佐手、 提交于 2019-12-03 10:18:02
I'm on Android 2.3.7 and I'm trying to write a BroadcastReceiver that will get called when the user turns GPS on/off (ie: by tapping on the "use GPS satellites" in the options. What I've done so far is this: 1) Created the following broadcastReceiver: public class GPSStatusBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context arg0, Intent arg1) { Toast.makeText(arg0, "Broadcast received!", Toast.LENGTH_SHORT).show(); } } 2)Added this to the android manifest, inside the tags: <receiver android:name=".GPSStatusBroadcastReceiver"> <intent-filter> <action android