Using Intents

by Georgy » Sun, 07 Jun 2009 23:28:19 GMT


Sponsored Links
 How can use intents in the following:

I want to use the RADAR function  in the package:
com.google.android.radar.SHOW_RADAR

I got that I need to input the following:

Intent i = new Intent("com.google.android.radar.SHOW_RADAR");
    i.putExtra("latitude", 37.422f);
    i.putExtra("longitude", -122.084f);
    startActivity(i);

but that throws and exception error.... is there anything I need to
know more?

thanks
--~--~---------~--~----~------------~-------~--~----~



Using Intents

by Marco Nelissen » Mon, 08 Jun 2009 00:08:57 GMT


 




What's the exception?

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


Sponsored Links


Using Intents

by Georgy » Mon, 08 Jun 2009 00:35:21 GMT


 "Unable to start activity ... no activity found to handle intent
{ action: com.google.android.radar.SHOW_RADAR (has extras) } "


You see I am trying to embed the radar functionality in my map
application. Since I only need to show a radar that has only one
destination point it's not worth writing a whole other radar program.
I was thinking to use intent and take from from another open source
app like this: 
 http://code.google.com/p/apps-for-android/source/browse/ #svn/trunk/Radar

is this possible?

thanks,

PS: I didn't copy the source code to my files.








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



Using Intents

by Mark Murphy » Mon, 08 Jun 2009 01:05:29 GMT


 


That would suggest that either you do not have the Radar application
installed, or the one you have installed does not match the
AndroidManifest.xml from the open source tree.

If you think you have it installed, did you compile from source, or
install it off the Market, or get it via some other means?

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

Looking for Android opportunties?  http://wiki.andmob.org/hado 

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



Using Intents

by Georgy » Mon, 08 Jun 2009 01:34:02 GMT


 You are right... for some reason I thought that I could simply point
to an external package without installing it. So now, I got Radar from
the market and pointed to it.

the issue now is that I am getting a black screen..


After looking at LogCat the activity ran without any problems... just
a black screen..

thanks







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



Using Intents

by Georgy » Mon, 08 Jun 2009 23:45:46 GMT


 Oh sorry I was jsut in an area without reception.

thanks guys





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



Using Intents

by Georgy » Tue, 09 Jun 2009 02:58:26 GMT


 Does anyone have any idea why the distance could be wrong? actually
it's not changing...

if my code is this:

 Intent i = new Intent("com.google.android.radar.SHOW_RADAR");
            i.putExtra("latitude", locode.getLatitudeE6()/1E6);
            i.putExtra("longitude", locode.getLongitudeE6()/1E6);
            startActivity(i);


is that enough for the radar to pickup my own location and compare it
to the one I attached to the putExtra???

If so, why is the distance not changing?










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



Using Intents

by Georgy » Wed, 10 Jun 2009 21:14:18 GMT


 Solved. As Locode was my GeoPoint:

// RADAR CODE
            Intent i = new Intent
("com.google.android.radar.SHOW_RADAR");
            i.putExtra("latitude",  (float)(locode.getLatitudeE6() /
1000000f));
            i.putExtra("longitude", (float)(locode.getLongitudeE6() /
1000000f));
            startActivity(i);


                  }

I still wonder what kind of unit does the intent RADAR takes, I
thought it was Long/latitude.









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



Other Threads

1. 3D UI framework like clutter on android

Hello all,

Are there any plans to add a 3D UI framework like Clutter on to
android which helps in developing 3D objects and animation easily and
also exploit opengles support at the backend.

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

2. HTMLViewer

When you email yourself a PDF or Office file, you can click Preview
and it opens up with HTML Viewer.

Is there a way to launch this process (HTMLViewer etc) without having
to email yourself the files?

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

3. how to get focus in AlarmClock

4. Socket problems: broken pipe

5. Trying to understand LocationListener.

6. Is it possible to launch another app's main activity just by changing manifest.xml?

7. How to copy file from apk raw folder