In my broadcast receiver activity I need to run some code when an alert is fired which I can get working no problem, but I need to make sure my Map activity is on the screen when this code is run, so I am trying to start the Map activity with an intent but this crashes the application and I do not know why.
I want to install an apk file and set a broadcast-receiver in order to catch information concerning install status.
I have prepared a BroadcastReceiver class :
public class newPackageReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.d("DEBUG"," test for application install/uninstall");
}
}
In the main activity, I fi
I am trying to setup a BroadcastReceiver to handle scheduled events. I have been following http://mobile.tutsplus.com/tutorials/android/android-fundamentals-schedu... , and had the feature working, or so I believed.
I am doing an app which Locks the screen on shake.
I have next problem:
I create a custom BroadcastReceiver and register it in main activity onCreate handler:
public class MainActivity extends ListActivity {
private static final LogReceiver logReceiver = new LogReceiver();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LocalBroadcastManager.getInstance(this).registerReceiver(logRece
I am following the code posted HERE on setting up an alarm manager but I can't get it to work at all.
This code is in a class called "Alarm":
package com.sjjgames.abortionapp;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.PowerMan
I have created an intent download service and I want to pass download data to Toast and into Text in main activity. Download service should start from alarm manager repeatedly. How do I do this?
Currently, it does not show in Toast, but I have network traffic; data is downloaded but not shown.
I make a simple Android Apps that will update its view when an SMS is received.
I have a receiver that is called whenever an SMS is received
public class SMSReceiver extends BroadcastReceiver
{
private SharedPreferences prefs;
private String prefName = "MyPref";
private static final String NUMBER_KEY = "number";
@Override
public void onReceive(Context context, Intent intent)
{
//---get the SMS message passed in---
Bundle bundle = intent.getExtras();
SmsMessage