English 中文(简体)
甲型六氯环己烷 离职回国
原标题:android getIntent().getSerializableExtra() returns null
  • 时间:2011-02-28 10:47:40
  •  标签:
  • android

我正试图发送信标(Serializable),其中16条载有从信使获得的数据。 我寄来的是,使用<代码>Extra(“string”,serializable Value)和I m接收器,使用getIntent(>getSerializable("string”)。 我已经将这一选择用于近10个功能,对我来说,这些功能是值得的。 但尤其是这一功能总是使我无法在接收地点返回。 我在寄出时对此事进行了核对。 它具有价值。 在接收地点。

我怀疑有16个领域,可以采用这种方法。 建议我为这一问题找到更好的解决办法。

问题回答

Try:

getIntent().getExtras().getSerializable("string")

我的法典用<代码>ArrayList<String>进行罚款。 请让我/介绍您的系列描述?

在另一个方面,根据这一规定:http://developer.android.com/vis/android/os/Parcelable.html,然后,如果你使用习俗类别,你需要“转让”以下数据: 公开书写的Torcel(Parcel(悬挂国旗的)和My PrivateParcel(产品载于<>。

详情请您将数据写到<编码>>>>>>>> ,并从in/code>获取。

Check if the String are equals to in both activities!! it happened to me I had one different capital letter, when I corrected it it worked :)





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...