broadcastreceiver

Receiver throws IllegalArgument exception

限于喜欢 提交于 2019-12-11 18:16:27
问题 Well i created a receiver class to start an intent. When user confirms the required things after couple of seconds app throws exception. This is logcat output 01-23 20:18:32.541: E/AndroidRuntime(7603): Process: com.ppero196.thumbnail.file.deleter:remote, PID: 7603 01-23 20:18:32.541: E/AndroidRuntime(7603): java.lang.RuntimeException: Unable to start receiver com.ppero196.thumbnail.file.deleter.reminderreciever: java.lang.IllegalArgumentException: contentView required: pkg=com.ppero196

BroadcastReceiver isn't working

时光怂恿深爱的人放手 提交于 2019-12-11 18:07:40
问题 None of this broadcast receivers are not triggered, but in another my application is working where I used to check network state. I have nothing else to say about this problem. package monitor; import android.content.BroadcastReceiver; public class Monitor extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { System.out.println("jupi"); } } <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"

How to add and remove multiple proximity alerts in location manager

寵の児 提交于 2019-12-11 17:39:02
问题 I am trying to add multiple proximity alert in location listener by giving unique requesCode to its pendingIntent but I am unable to get the alert where I set the location. And app is also crashed several times, please help here's my code public class LocationTrackerService extends Service implements LocationListener { private static final long RADIUS = 1000; // in Meters private static final long PROX_ALERT_EXPIRATION_TIME = -1; Context context; String msg; LocationManager locationManager;

Is there any way to get notified before the app is being replaced by another?

半世苍凉 提交于 2019-12-11 17:01:38
问题 I know about the ACTION_MY_PACKAGE_REPLACED Intent action but what it do is - notifies the receiver AFTER the app got replaced. But the things is - I want to know before the app is being replaced by another. I tried with these actions <receiver android:name=".receivers.InstallReceiver" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="android.intent.action.PACKAGE_INSTALL" /> <action android:name="android.intent.action.PACKAGE_ADDED" /> <action android:name

Problems with searching for available device, via bluetooth, in android

与世无争的帅哥 提交于 2019-12-11 16:27:26
问题 My app should just check, via bluetooth, if there is certain Arduino server around, and toast proper message. This is the code when user presses button to search for server: public void onClick(View v) { Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices(); if (pairedDevices.size() > 0) { for (BluetoothDevice device : pairedDevices) { if (device.getName().equals("ARD_SPP")) { sendButton.setVisibility(View.VISIBLE); Toast.makeText(ConnectActivity.this, "Arduino server

Android - Sending/Receiving POJOs across Applications via Broadcast Receiver

扶醉桌前 提交于 2019-12-11 16:25:48
问题 I am doing two Android Applications. Application 1 sends a Broadcast which has an "Extra" Custom POJO placed into it. Application 2 receives the Broadcast and gets the "Extra"(Custom POJO) and displays it. Here is my Custom POJO in that implements Parcelable package com.steven.app1; public class Customer implements Parcelable { private int id; private String firstName; private String lastName; public static final Parcelable.Creator<Customer> CREATOR = new Parcelable.Creator<Customer>() {

ACTION_SHUTDOWN/QUICKBOOT_POWEROFF broadcast not working for Huawei devices

怎甘沉沦 提交于 2019-12-11 15:27:28
问题 I am trying to get broadcast at device SHUTDOWN/Reboot in my app. I can get these events in Samsung and in OPPO devices but these are not working in Huawei devices. any guesses why? this is my manifest file for broadcast receiver. <receiver android:name=".broadcast_receivers.DeviceOnOffReceiver" android:enabled="true"> <intent-filter android:priority="1"> <category android:name="android.intent.category.DEFAULT"/> <action android:name="android.intent.action.BOOT_COMPLETED"/> <action android

Bluetooth: No broadcast for ACTION_FOUND or ACTION_DISCOVERY_FINISHED

时光怂恿深爱的人放手 提交于 2019-12-11 14:49:36
问题 This simple broadcastreceiver never receives anything. No discovered device from BluetoothDevice and no start/stop of discovery from BluetoothAdapter . Earlier in the code, I check that Bluetooth is enabled and the BluetoothAdapter correctly lists the three paired devices. I've tried variations of unpairing them manually in the phone and I turn bluetooth visibility in the three remote devices on and off. But nothing is logged from my broadcast receiver. I start/stop discovery with layout

Broadcast not received from Chrome Custom Tab menu item click

為{幸葍}努か 提交于 2019-12-11 14:44:18
问题 I am doing the following within a Fragment (condensed for convenience): intentBuilder = new CustomTabsIntent.Builder(); String label = "Test"; PendingIntent pendingIntent = createPendingIntent(ActionBroadcastReceiver.ACTION_TEST); intentBuilder.addMenuItem(label, pendingIntent); CustomTabActivityHelper.openCustomTab( getActivity(), intentBuilder.build(), mUri, null); private PendingIntent createPendingIntent(int actionSourceId) { Intent actionIntent = new Intent(getActivity()

Can Manifest Receiver for In app payment be moved to Java code instead?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 14:10:01
问题 Google example for in-app payment suggests to add the manifest entry in order to receive the payment confirmations. But in Native Extension for AIR, the receiver will not be found as its a different package. So i moved the receiver part to code as follows final IntentFilter filter = new IntentFilter("com.android.vending.billing.IN_APP_NOTIFY"); filter.addAction("com.android.vending.billing.RESPONSE_CODE"); filter.addAction("com.android.vending.billing.PURCHASE_STATE_CHANGED"); a