Passing a 2 dimensional array to an Activity

by Zhubham » Wed, 01 Apr 2009 13:55:12 GMT


Sponsored Links
 Hi,

I need to pass a 2 dimensional array to an ACTIVITY  from a SERVICE.
How can I achieve this in minimum number of statements (as in avoiding
putExtras for each and every string stored in the array)??

Please help me with this.

Thanks.

Best Regards,
Zhubham
--~--~---------~--~----~------------~-------~--~----~



Passing a 2 dimensional array to an Activity

by dillirao malipeddi » Wed, 01 Apr 2009 19:11:40 GMT


 you can do in this way also...

Use a static two dimensional array in separate class and use it in service
and activity






-- 
Dilli Rao. M

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


Sponsored Links


Passing a 2 dimensional array to an Activity

by Miguel Paraz » Wed, 01 Apr 2009 20:21:09 GMT


 


Hi,
You could use the JSON en/decoding functions. You can store lists and
maps of Strings. They probably consume more CPU, though.
--~--~---------~--~----~------------~-------~--~----~



Passing a 2 dimensional array to an Activity

by Mark Murphy » Wed, 01 Apr 2009 20:25:07 GMT


 




If the service is in the same process as the activity, you can use the
singleton pattern and have the activity call some method on the service
object.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android App Developer Books:  http://commonsware.com/books.html 

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



Other Threads

1. Questions About Creating an Emulator

Okay, so I am a student at Northwestern University working on a
project for an entrepreneurship class.  I have a decent understanding
of programming and computer science, but by no means am I technical
expert.  I have only dabbled in this field for a bit when I was
younger, so please excuse my ignorance on the matter.

My group is working on developing plans for a new start-up in the
mobile development industry.  We are trying to address the problem of
Android fragmentation, and that fact that developers have to spend way
too much time and money testing their applications across a variety of
devices.  From our understanding, developers generally have to buy the
phones that they would like to test their product on, and manually
test it on that phone (or device).  This costs a lot of money for
small to mid-range app developers, and wastes a lot of time.

Basically, my group is (theoretically) trying to develop a software
product that would be delivered as a service (SaaS) for mobile app
developers. Out product would alleviate the pains of developers by
enabling them to test their products on a sophisticated emulator that
can accurately emulate a wide-range of hardware devices and use
scenarios.  This emulator would theoretically be sufficiently
integrated with a wide-range of hardware so that you don't need to
actually purchase the phone to make sure it functions properly.  It
would also offer a huge array of customizable use scenarios so that
developers can see how their application will function in almost any
scenario (3g, 4g, edge, wi-fi, good reception, bad reception,
switching networks, getting a call, turning it sideways etc...).

Currently, there are some emulators out there, but none of them work
that well from what I've heard.  There are also a couple of companies
that operate in the same arena, namely: http://www.deviceanywhere.com/
and http://www.perfectomobile.com/

So, I was looking for some insight from the developer community on how
this product would have to be developed and implemented in order to
work.  Obviously, this is no small undertaking.  We would be devoting
considerable resources to developing this product - probably close to
$300,000 - $400,000, with a 4 to 6 man development team.

So here are some specific questions, I guess.

1) Is this product feasible to make?

2) What exactly are developers looking for in a product like this?

3) How would we best go about getting developers to try out product?

4) Would the emulation processes be able to be outsourced into the
cloud, or would this require large amounts of in-house hardware?

5)  What other considerations should we be addressing before hiring a
team of developers to do this?

6) Would any of you be interested in getting more involved with our
project, as we consider seeking funding from venture capital firms?

I truly appreciate anyone willing to answer any of these questions.
Thank you so much.

-- 

2. How to Uninstall a Core App from an Emulator Image

I want to try to hack a bit on the DeskClock core application. I
imported the code into Eclipse and tried to run it in the emulator as
is, but I got the following error:

[2011-02-20 08:15:42 - DeskClock] Uploading DeskClock.apk onto device
'emulator-5554'
[2011-02-20 08:15:42 - DeskClock] Installing DeskClock.apk...
[2011-02-20 08:16:05 - DeskClock] Re-installation failed due to
different application signatures.
[2011-02-20 08:16:05 - DeskClock] You must perform a full uninstall of
the application. WARNING: This will remove the application data!
[2011-02-20 08:16:05 - DeskClock] Please execute 'adb uninstall
com.android.deskclock' in a shell.
[2011-02-20 08:16:05 - DeskClock] Launch canceled!

So, I tried that:

$ ./adb uninstall com.android.deskclock
Failure
$ ./adb -e uninstall com.android.deskclock
Failure
$ ./adb -s emulator-5554 uninstall com.android.deskclock
Failure

I understand that I can't do this on a real device without rooting it
and that's fine, I just want to play around in the emulator for now.
Any thoughts?

-- 

3. Nexus One crash and restart after "CPU pegged" if OpenGL ES 2.0 and 8888 instead of 565

4. How to make an app similar to Pulse News Reader for Android

5. Simultaneous existence of Wi-Fi Service and Cellular Call Service(Call only)

6. Bluetooth killer availabled in Android ? - WiFi Direct

7. Key press in AutoCompleteTextView launches global SearchActivity - WHY ?