0

I am trying to pass a android.location; to an activity as a bundled extra. the Location class implements Parcelable so i thought i could just use

intent.putExtra(String name,Parcelable value)

but it won't let me for some reason..

Location _latestlocal; // is set by my location manager;

but when i write

i.putExtra("location", _latestLocal);

it gives me the error:

The method putExtra(String, boolean) in the type Intent is not applicable for the arguments (KNAugmentedRealityActivity.extras, Location)

am i missing something?

Gavin S. Yancey
  • 1,216
  • 1
  • 13
  • 34
erik
  • 4,946
  • 13
  • 70
  • 120
  • The issue seems to be with the first parameter of the `putExtra`, not with the `Location`. Are you sure the first parameter is indeed the `String` "location"? – Rajesh May 30 '14 at 19:15
  • oh my god.. i am so stupid.. thanks.. i was actually using an enum and not a string and forgot to call .name() thanks!! – erik May 30 '14 at 19:17

0 Answers0