I am having trouble when I try to pass a text string from within an EditText to either Facebook or Twitter via an intent.
Why won't this work? Just trying to pass a editable string from one activity to another. But I cannot get it to work. Does the string passed through the intent have to be pre defined?
I am new to Android.
I'm following a tutorial which allows users to save data to NFC tags.
I have a problem relating Intent.
Class A
Intent i=new Intent(getApplicationContext(),JobOffer.class);
i.putExtra("From",aryListBean.get(arg2).getUser());
i.putExtra("StartDate",aryListBean.get(arg2).getStartDate());
i.putExtra("DueDate",aryListBean.get(arg2).getEndDate());
startActivity(i);
Class B
Bundle b=getIntent().getExtras();
String user=b.getString("From");
String startda
String s1 = e1.getText().toString();
String s2 = e2.getText().toString();
String s3 = e3.getText().toString();
Intent updateIntent = new Intent(DetailActivity.this,MainActivity.class);
Bundle bundle = new Bundle();
bundle.putString("name", s1);
bundle.putString("lat", s2);
bundle.putString("lon", s3);
As per Android API http://developer.android.com/guide/topics/data/data-storage.html#pref
Shared Preference allows you to save and retrieve persistent key-value
pairs of primitive data types. You can use SharedPreferences to save
any primitive data: booleans, floats, ints, longs, and strings.
is String a primitive data type or an Object?
Thanks in advance.
I have no problem in passing data to a service using intent, extras, etc and using startService(intent)
Intent intent = new Intent();
intent.setClass(MainActivity.this, MediaPlayerService.class);
intent.setAction(MediaPlayerService.PLAY_PAUSE);
intent.putExtra("URI", URI);
intent.putExtra("TITLE", content.toString());
//PendingIntent.getService(MainActivity.this, 0, intent, 0);
startService(inte
Hi,
Today is my second day playing (learning) android app dev. On day 1, was lucky enough to get a very basic app up and running with ADT and tested it w/ AVD. But too basic, input simple text and displays it.
Was hoping to be able to save input into local file system or some sort of db today. The thought is to use SharedPreferences class for simple key/value pair storage for now.