You can call getParcelableExtra() on an Intent, not on a PendingIntent. On Mon, Mar 14, 2011 at 6:21 PM, Lars Nielsen Lind <[email protected]> wrote: > Hi, > > I have used the following code which is published on various sites: > > > PendingIntent intent = > PendingIntent.getActivity(this.getApplicationContext(), 0,new > Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP),0); > > NfcAdapter.getDefaultAdapter(this).enableForegroundDispatch(this,intent, > null, null); > > Tag tag = (Tag) intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); > > > Here is the error message: > > The method getParcelableExtra(String) is undefined for the type > PendingIntent > > Anyone that knows why I can't call getParcelable(....) as shown above? > > Thanks, > > Lars > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en >
-- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Oslo: http://bit.ly/fjBo24 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

