Hello!
I want to start an Activity, using monkeyrunner or adb shell, that reads
some extra values from the Intent. When trying to get a long value a
ClassCastException is shown in log, and the default value is returned:
* java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.Long
at android.os.Bundle.getLong(Bundle.java:973)
at android.content.Intent.getLongExtra(Intent.java:4063)*
I'm reading the extra this way:
* getIntent().getLongExtra("id", 0);*
>From Monkeyrunner script I tried to start the Activity using {"id": 100} or
{"id": 100L} as extras. The latter doesn't even send the extras to the
Activity.
Then I tried starting it from adb shell by myself, but I had the same
result. Also there's no specific option to add a long extra, only "-ei" is
available.
So, Is it possible to send a long extra value from these tools?
Thanks!
Pablo
--
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