i am quite new at android studio, and i am just want to putString in one activity and getExtracts and String in another activity i am doing it like this
Intent goToNextActivity = new Intent(getApplicationContext(), ActivityView.class);
Bundle bundle = new Bundle();
bundle.putString("username", user_name);
bundle.putString("password", pass_word);
goToNextActivity.putExtras(bundle);
startActivity(goToNextActivity);
and wont get them in another activity here is my code
String user_name = getIntent().getExtras().getString("username");
String pass_word = getIntent().getExtras().getString("password");
String data = "name=" + user_name + "&pass=" + pass_word;
data+="&form_build_id=form-DoJeK3K6HriBp5BU24rNE1uT405P_7sC3PPVf4VV7nA&form_id=user_login_block&op=Log in";
mWebView.postUrl("http://example.com/frontpage?destination=frontpage", EncodingUtils.getBytes(data, "base64"));
and when i run it i give an error here is log cat
11-01 17:31:16.279 4161-4161/com.example W/KeyCharacterMap﹕ Can't open keycharmap file 11-01 17:31:16.279 4161-4161/com.examplet W/KeyCharacterMap﹕ Error loading keycharmap file '/data/usr/keychars/tegra-kbc.kcm.bin'. hw.keyboards.0.devname='tegra-kbc' 11-01 17:33:59.899 4161-4161/com.example D/dalvikvm﹕ GC_EXPLICIT freed 677K, 50% free 3117K/6215K, external 2734K/2773K, paused 40ms device offline
0 comments:
Post a Comment