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
I make a simple Android Apps that will update its view when an SMS is received.
I am trying to pass LinkedHashMap between activities, my code is like this
Activity A
LinkedHashMap mLinkedHashMap = new LinkedHashMap<String, Object>();
// setting data in map
Bundle bundle = new Bundle();
bundle.putSerializable("OBJECTS_LINKED_HASHMAP", mLinkedHashMap);
Intent intent = new Intent(this, ActivityB.class);
intent.putExtras(bundle);
startActivity(intent);
in Activity w
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 use this code to send a sms to the incoming number before receiving this call, but it does not work correctly..
public class check extends BroadcastReceiver {
Context context = null;
private static final String TAG = "Phone call";
private ITelephony telephonyService;
@Override
public void onReceive(Context context, Intent intent) {
Log.v(TAG, "Receving....");
Telep
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
Hi friends i have a problem...
Actually i use this code to open my application in certain time..the app is working fine but when the device is in sleep mode not working..??
public class MyBroadCastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context ctx, Intent intent) {
Intent intent = new Intent(ctx, ActivityMain.class);
intent.addFlags(Intent.FL
After sorting out my code I keep getting a null on my second screen when i hit the submit button having trouble spotting my mistake any help would be appreciated.
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.