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)
 http://commonsware.com  |  http://twitter.com/commonsguy 

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.

 

Emre
 


_________________________________________________________________
Click less, chat more: Messenger on MSN.ca
 http://go.microsoft.com/?linkid=9677404 
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. How to use service from another Android package

Hello,

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:process=":remote">
                <intent-filter>
                        <action
android:name="de.android.examples.countersecond.SECOND_COUNTER_SERVICE" /
                </intent-filter>
        </service>

where  de.android.examples.countersecond.ISecondCounterService is the
AIDL-Interface, the
de.android.examples.countersecond.SecondCounterService is the service
implementation.

The component A from package A can start the service with
startService(new Intent
("de.android.examples.countersecond.SECOND_COUNTER_SERVICE"));

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,
Vladimir


--~--~---------~--~----~------------~-------~--~----~

2. problem obtaining android source from windows/cygwin

bash-3.2$ /cygdrive/c/myRepo/repo init -u git://android.git.kernel.org/platform
/manifest.git
Traceback (most recent call last):
  File "/cygdrive/c/myRepo/repo", line 587, in <module>
    main(sys.argv[1:])
  File "/cygdrive/c/myRepo/repo", line 554, in main
    _Init(args)
  File "/cygdrive/c/myRepo/repo", line 173, in _Init
    _CheckGitVersion()
  File "/cygdrive/c/myRepo/repo", line 202, in _CheckGitVersion
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/cygdrive/c/cygwin/lib/python2.5/subprocess.py", line 593, in
__init__
    errread, errwrite)
  File "/cygdrive/c/cygwin/lib/python2.5/subprocess.py", line 1079, in
_execute_
child
    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.

Paul
--~--~---------~--~----~------------~-------~--~----~

3. RTTI

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.