2011-04-05 26 views
2

我使用联系人选取器来获取特定联系人的姓名。对于埃克莱尔后来我用:BadParcelableException:获取所选联系人姓名时的ClassNotFoundException

startActivityForResult(new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI), CONTACT_PICKER_RESULT); 

onActivityResult()我只是做:

final String contactName = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME); 

在那里我得到这个例外,这个工程除了上的Motoblur,罚款:

android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.motorola.blur.provider.contacts.IdentityModel 
    at android.os.Parcel.readParcelable(Parcel.java:1883) 
    at android.os.Parcel.readParcelableArray(Parcel.java:1922) 
    at android.os.Parcel.readValue(Parcel.java:1825) 
    at android.os.Parcel.readMapInternal(Parcel.java:2008) 
    at android.os.Bundle.unparcel(Bundle.java:208) 
    at android.os.Bundle.getString(Bundle.java:1034) 
    at android.content.Intent.getStringExtra(Intent.java:3399) 

有另一种获得在Motoblur上的名字的方式? Motoblur有没有解决方法?

由于提前,
乔纳斯

回答

2

使用ContentResolver工作正常。看起来好像Intent.EXTRA_SHORTCUT_NAME在所有手机上都无法可靠运行(我也听说有关它在HTC上无法正常工作的报道)。

相关问题