How to pass a variable to a new activity via intent ?

by Mark Murphy » Thu, 17 Sep 2009 06:46:01 GMT

Sponsored Links

Call getIntent().

Mark Murphy (a Commons Guy)  | 

Warescription: Three Android Books, Plus Updates, $35/Year


How to pass a variable to a new activity via intent ?

by Emre A. Yavuz » Thu, 17 Sep 2009 07:36:14 GMT

 Problem solved. Thanks Mark.



Click less, chat more: Messenger on 

Sponsored Links

Other Threads

1. How to use service from another Android package


I've seen the documentation on the Android Site and different
examples, but I've not seen an example how a component A in one
package A can use the service of another package B.

The package B declares the service like that

        <service android:name=".SecondCounterService"
android:name="" /

where is the
AIDL-Interface, the is the service

The component A from package A can start the service with
startService(new Intent

But I don't know how to bind the service. I have no reference to
ISecondCounterService and SecondCounterService. How can I use the
methods of the service when I cannot cast to ISecondCounterService in
the method
        public void onServiceConnected(ComponentName className,
                IBinder service) {}

Thank you in advance.

Best wishes,


2. problem obtaining android source from windows/cygwin

bash-3.2$ /cygdrive/c/myRepo/repo init -u git://
Traceback (most recent call last):
  File "/cygdrive/c/myRepo/repo", line 587, in <module>
  File "/cygdrive/c/myRepo/repo", line 554, in main
  File "/cygdrive/c/myRepo/repo", line 173, in _Init
  File "/cygdrive/c/myRepo/repo", line 202, in _CheckGitVersion
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/cygdrive/c/cygwin/lib/python2.5/", line 593, in
    errread, errwrite)
  File "/cygdrive/c/cygwin/lib/python2.5/", line 1079, in
    raise child_exception
OSError: [Errno 2] No such file or directory

I wouldn't describe myself as a Python guru.  Has anyone been able to
overcome and fix this problem?

Thanks much.



4. API for arbitrary tags in an image file (location etc)?

5. API for getting URL associated with a Geopoint

6. Filesystem on G1

7. Adding views at runtime.