0

How to send data between two activities?I have the following code, but I only get null in the receiver activity:

The activity from which I send data:

Intent intent = new Intent(SecondScreen.this, ThirdScreen.class);
                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);//clear previous activities
                intent.putExtra("CLIENT_ID", getUserID);
                intent.putExtra("PASSWORD", getUserPWD);
                startActivity(intent);

The activity where I want to receive data:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_third_screen);
Bundle b = getIntent().getExtras(); 
    if (b != null)
    {
        CLIENT_ID =  b.getString("CLIENT_ID"); 
        CLIENT_PWD =  b.getString("PASSWORD"); 
    }

So what am I doing wrong?

UPD here is LogCat:

03-07 12:04:10.340: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, 

error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:10.340: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:10.661: E/Settings:###(16748): onApplyThemeResource...
03-07 12:04:11.021: E/SurfaceTexture(1451): [AtchDlg:com.htc.launcher/com.htc.launcher.Launcher] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
03-07 12:04:11.492: E/SurfaceTexture(1451): [SurfaceView] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:04:11.502: E/SurfaceTexture(1451): [com.htc.launcher/com.htc.launcher.Launcher] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:04:12.753: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:13.744: E/Settings:###(16748): onApplyThemeResource...
03-07 12:04:13.784: E/HtcPreferenceActivity(16748): context.getClassLoader(): dalvik.system.PathClassLoader[/system/app/Settings.apk]
03-07 12:04:13.784: E/HtcPreferenceActivity(16748): context.getPackageName(): com.android.settings
03-07 12:04:13.784: E/HtcPreferenceActivity(16748): context.getPackageCodePath(): /system/app/Settings.apk
03-07 12:04:13.784: E/HtcPreferenceActivity(16748): context.getPackageResourcePath(): /system/app/Settings.apk
03-07 12:04:13.784: E/HtcPreferenceActivity(16748): fragmentName: com.android.settings.DisplaySettings
03-07 12:04:14.194: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:14.244: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:14.494: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:14.504: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:14.565: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.Settings] abandon: SurfaceTexture(0x0x2668c0) has been abandoned!
03-07 12:04:18.699: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.SubSettings] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:04:19.870: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.SubSettings] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
03-07 12:04:22.382: E/Adreno200-ES20(4154): <process_gl_state_enables:456>: GL_INVALID_ENUM
03-07 12:04:22.592: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.Settings] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:04:26.626: E/Wifi_Pair(17131): Error occured while reading paired Winamp Ids.
03-07 12:04:30.510: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:30.890: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:30.910: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:30.931: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:30.931: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:30.941: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:30.941: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:30.941: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.021: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.031: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.071: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.091: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.131: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.131: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.261: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.541: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.541: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.571: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:31.721: E/ConversionPing(17280): ConversionPing could not reach the url, no conversion sent.
03-07 12:04:32.312: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:32.322: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:32.802: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:04:38.268: E/Settings:###(16748): onApplyThemeResource...
03-07 12:04:38.768: E/SettingsMobileDataEnabler(16748): mSummary is null!!
03-07 12:04:38.798: E/SettingsMobileDataEnabler(16748): mSummary is null!!
03-07 12:04:38.858: E/SurfaceTexture(1451): [SurfaceView] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
03-07 12:04:38.868: E/SurfaceTexture(1451): [com.htc.launcher/com.htc.launcher.Launcher] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:04:42.922: E/SettingsMobileDataEnabler(16748): mSummary is null!!
03-07 12:04:42.932: E/SettingsMobileDataEnabler(16748): mSummary is null!!
03-07 12:04:43.032: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.SoundSettings] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
03-07 12:04:44.474: E/AudioService(1593): [AudioHandler] syncSetIndex Call setStreamVolumeIndex isHeadsetPlugged(): false
03-07 12:04:44.474: E/AudioService(1593): [AudioHandler] syncSetIndex Call setStreamVolumeIndex isHeadsetPlugged(): true
03-07 12:04:44.474: E/AudioService(1593): [AudioHandler] syncSetIndex Call setStreamVolumeIndex isHeadsetPlugged(): false
03-07 12:04:44.474: E/AudioService(1593): [AudioHandler] syncSetIndex Call setStreamVolumeIndex isHeadsetPlugged(): true
03-07 12:04:44.474: E/AudioService(1593): [AudioHandler] syncSetIndex Call setStreamVolumeIndex isHeadsetPlugged(): false
03-07 12:04:44.484: E/AudioService(1593): [AudioHandler] syncSetIndex Call setStreamVolumeIndex isHeadsetPlugged(): true
03-07 12:04:44.484: E/AudioService(1593): [AudioHandler] syncSetIndex Call setStreamVolumeIndex isHeadsetPlugged(): false
03-07 12:04:44.484: E/AudioService(1593): [AudioHandler] syncSetIndex Call setStreamVolumeIndex isHeadsetPlugged(): true
03-07 12:04:44.704: E/SettingsMobileDataEnabler(16748): mSummary is null!!
03-07 12:04:44.724: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.SoundSettings] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
03-07 12:04:44.754: E/SettingsMobileDataEnabler(16748): mSummary is null!!
03-07 12:04:47.817: E/AudioHardwareMSM7X30(1454): output is hw device
03-07 12:04:50.049: E/SettingsMobileDataEnabler(16748): mSummary is null!!
03-07 12:04:50.059: E/SettingsMobileDataEnabler(16748): mSummary is null!!
03-07 12:04:50.229: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.SoundSettings] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
03-07 12:04:52.632: E/Adreno200-ES20(4154): <process_gl_state_enables:456>: GL_INVALID_ENUM
03-07 12:04:52.932: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.SoundSettings] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:06:23.173: E/SurfaceTexture(1451): [com.htc.clock3dwidget.idlescreen.IdleScreenClockService] abandon: SurfaceTexture(0x0x225988) has been abandoned!
03-07 12:18:19.071: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:18:19.142: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:18:19.262: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:18:19.272: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:21:59.930: E/Adreno200-ES20(4154): <process_gl_state_enables:456>: GL_INVALID_ENUM
03-07 12:22:00.541: E/Wifi_SyncServer(17131): Error occurred while accepting client request.
03-07 12:22:00.541: E/Wifi_SyncServer(17131): java.net.SocketException: Socket closed
03-07 12:22:00.541: E/Wifi_SyncServer(17131):   at libcore.io.Posix.accept(Native Method)
03-07 12:22:00.541: E/Wifi_SyncServer(17131):   at libcore.io.BlockGuardOs.accept(BlockGuardOs.java:55)
03-07 12:22:00.541: E/Wifi_SyncServer(17131):   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:98)
03-07 12:22:00.541: E/Wifi_SyncServer(17131):   at java.net.ServerSocket.implAccept(ServerSocket.java:202)
03-07 12:22:00.541: E/Wifi_SyncServer(17131):   at java.net.ServerSocket.accept(ServerSocket.java:127)
03-07 12:22:00.541: E/Wifi_SyncServer(17131):   at com.nullsoft.winamp.wifi.b.run(SourceFile:89)
03-07 12:22:00.541: E/Wifi_SyncServer(17131):   at java.lang.Thread.run(Thread.java:864)
03-07 12:22:03.534: E/mode10(1730): Scene container cannot bind null scene
03-07 12:22:03.784: E/SurfaceTexture(1451): [Keyguard] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:22:06.617: E/SurfaceTexture(1451): [AtchDlg:com.htc.launcher/com.htc.launcher.Launcher] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:22:06.667: E/SurfaceTexture(1451): [SurfaceView] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
03-07 12:22:06.697: E/SurfaceTexture(1451): [com.htc.launcher/com.htc.launcher.Launcher] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:08.328: E/Settings:###(16748): onApplyThemeResource...
03-07 12:22:08.348: E/HtcPreferenceActivity(16748): context.getClassLoader(): dalvik.system.PathClassLoader[/system/app/Settings.apk]
03-07 12:22:08.348: E/HtcPreferenceActivity(16748): context.getPackageName(): com.android.settings
03-07 12:22:08.348: E/HtcPreferenceActivity(16748): context.getPackageCodePath(): /system/app/Settings.apk
03-07 12:22:08.348: E/HtcPreferenceActivity(16748): context.getPackageResourcePath(): /system/app/Settings.apk
03-07 12:22:08.348: E/HtcPreferenceActivity(16748): fragmentName: com.android.settings.DevelopmentSettings
03-07 12:22:08.418: E/Cryptfs(1445): not running with encryption, aborting
03-07 12:22:08.759: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.Settings] abandon: SurfaceTexture(0x0x2668c0) has been abandoned!
03-07 12:22:10.881: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.SubSettings] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:22:11.732: E/Adreno200-ES20(4154): <process_gl_state_enables:456>: GL_INVALID_ENUM
03-07 12:22:12.032: E/SurfaceTexture(1451): [com.android.settings/com.android.settings.SubSettings] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
03-07 12:22:14.985: E/wpa_supplicant(17696): Starting wpa_supplicant...
03-07 12:22:17.688: E/wpa_supplicant(17696): ioctl[SIOCSIWPRIV] (cscan): -1
03-07 12:22:17.938: E/WifiConfigStore(1593): Missing id while parsing configuration
03-07 12:22:17.938: E/WifiConfigStore(1593): Missing id while parsing configuration
03-07 12:22:17.938: E/WifiConfigStore(1593): Missing id while parsing configuration
03-07 12:22:18.048: E/wpa_supplicant(17696): ioctl[SIOCSIWPRIV] (cscan): -1
03-07 12:22:27.737: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:31.741: E/SurfaceTexture(1451): [SurfaceView] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:22:31.831: E/SurfaceTexture(1451): [com.htc.launcher/com.htc.launcher.Launcher] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:32.352: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:32.362: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:37.016: E/SurfaceTexture(1451): [Waiting For Debugger] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:22:40.149: E/SurfaceTexture(1451): [Starting com.vladimir.expert_suise] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
03-07 12:22:44.323: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:44.334: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:44.334: E/Icing(18131): Not enough disk space. Will not index.
03-07 12:22:45.314: E/SurfaceTexture(1451): [com.vladimir.expert_suise/com.vladimir.expert_suise.FirstScreen] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:22:45.415: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:46.426: E/AbstractCompatWrapper(1785): Invalid input to AbstructCompatWrapper
03-07 12:22:46.426: E/CompatUtils(1785): Exception in invoke: NullPointerException
03-07 12:22:47.366: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:47.366: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:47.386: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:47.477: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:47.577: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:47.597: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:47.607: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:47.627: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:48.357: E/SurfaceTexture(1451): [PopupWindow:4143a148] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:48.628: E/SurfaceTexture(1451): [PopupWindow:4143a148] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:48.918: E/SurfaceTexture(1451): [PopupWindow:4143a148] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:49.238: E/SurfaceTexture(1451): [PopupWindow:4143a148] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:49.529: E/SurfaceTexture(1451): [PopupWindow:4143a148] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:49.819: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:49.829: E/SurfaceTexture(1451): [PopupWindow:4143a148] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:49.849: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.009: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.019: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.029: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.039: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.049: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.099: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.109: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.379: E/SurfaceTexture(1451): [PopupWindow:4143a148] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:50.379: E/SurfaceTexture(1451): [InputMethod] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:22:50.620: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.620: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.780: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:50.910: E/AbstractCompatWrapper(1785): Invalid input to AbstructCompatWrapper
03-07 12:22:50.910: E/CompatUtils(1785): Exception in invoke: NullPointerException
03-07 12:22:51.330: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:51.410: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:52.602: E/SurfaceTexture(1451): [PopupWindow:4143a148] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:53.202: E/SurfaceTexture(1451): [PopupWindow:4143a148] abandon: SurfaceTexture(0x0x264140) has been abandoned!
03-07 12:22:53.212: E/SurfaceTexture(1451): [InputMethod] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:22:54.834: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:54.844: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:54.854: E/SqliteDatabaseCpp(3028): native_1x1_string (step): errno = 2, error message = No such file or directory, path = /data/data/com.google.android.gsf/databases , key = cwevragew, handle = 0x1eb6250
03-07 12:22:56.265: E/SurfaceTexture(1451): [PopupWindow:40e0d440] abandon: SurfaceTexture(0x0x250738) has been abandoned!
03-07 12:24:37.604: E/SurfaceTexture(1451): [com.vladimir.expert_suise/com.vladimir.expert_suise.SecondScreen] abandon: SurfaceTexture(0x0x24b350) has been abandoned!
4

5 回答 5

3

当前活动

Intent intent = new Intent(Current.this, Next.class);
intent.putExtra("user", "admin");
intent.putExtra("pass", "123");
startActivity(intent);

下一个活动

Intent intent = getIntent();
String user = intent.getExtras().getString("user");
String option = intent.getExtras().getString("pass");
于 2013-03-07T10:16:35.073 回答
2

假设您在传递到时的字符串中有一个值putExtra,请检查下面的代码段,如果您以相同的方式进行操作,那么该死的肯定会给您完美的结果,否则您在其他地方做错了。

MainActivity.java

String getUserID="I am new bee";
 String getUserPWD="Let me google it";


 Intent intent = new Intent(MainActivity.this, SecondActivity.class);
         intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);//clear previous activities
         intent.putExtra("CLIENT_ID", getUserID);
         intent.putExtra("PASSWORD", getUserPWD);
         startActivity(intent);

SecondActivity.java

String CLIENT_ID="";
 String CLIENT_PWD="";

         Bundle b = getIntent().getExtras(); 
            if (b != null)
            {
                CLIENT_ID =  b.getString("CLIENT_ID"); 
                CLIENT_PWD =  b.getString("PASSWORD"); 
            }

            Log.d("^^^^^", "CLIENT_ID="+CLIENT_ID);
            Log.d("^^^^^", "CLIENT_PWD="+CLIENT_PWD);

输出:

03-10 10:30:59.946: D/^^^^^(10974): CLIENT_ID=I am new bee
03-10 10:30:59.946: D/^^^^^(10974): CLIENT_PWD=Let me google it

我确定您的 String 在传递时为空,在调用时简单打印出来Intent

于 2013-03-07T10:34:04.847 回答
0

你必须在你的第二个活动中做这样的事情:

if(getIntent().hasExtras("CLIENT_ID") && getIntent().hasExtras("PASSWORD"))
{
    getIntent().getStringExtra("CLIENT_ID");
    getIntent().getStringExtra("PASSWORD");
}
于 2013-03-07T10:25:32.613 回答
0

我已经尝试过您的确切代码并且工作正常..

通过在两个活动中插入此行并跟踪日志,确保 CLIENT_ID 和 PASSWORD 首先和第一个活动不是 Null

Log.d("您的数据", >>>>>" + CLIENT_ID + "//" + CLIENT_PWD);

于 2013-03-07T10:38:37.630 回答
-1

你正在传递一个包,所以你应该在第一个活动中尝试这个:

Intent intent = new Intent(SecondScreen.this, ThirdScreen.class);
Bundle bundle = new Bundle();
bundle.putString("CLIENT_ID", getUserID);
bundle.putString("PASSWORD", getUserPWD);
intent.putExtras(bundle);
startActivity(intent);
于 2013-03-07T10:07:51.270 回答