i'm having some trouble about this operation.
I have a widget that update some things. When arrive an sms , i wanna update it after receiving.
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 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.
Here is the declaration in 'MainActivity.java'
private static String competition = null;
I've created a setter function which adds value to it.
public static void setCompetition(String competition1) {
competition = competition1;
}
I've created a getter function to get the value in another class from the same package:
public static String getCompetition() {
return competition;
}
Ho
hey im creating android project that require sending SMS
heres my code:
private void sendSMS(String destSMS, String msgSMS) {
// TODO Auto-generated method stub
String SENT = "SMS_SENT";
String DELIVERED = "SMS_DELIVERED";
PendingIntent pi = PendingIntent.getBroadcast(this, 0,
new Intent(SENT), 0);
PendingIntent deliveri_pi = PendingIntent.getBroadcast(this, 0,
please help me.
I am trying to receive sms and then I am sending SMS message to PHP webserver. When new sms is received then content of that sms is must be passes as NameValuePair parameter to send to web server.
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
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 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