--PROBLEM SOLVED--
The Code Above will generate a simple map if you use a correct api
key. (Which I was using.)
Here is why the application wouldn't launch:
I ran the program with the phone plugged in using Eclipse->Run As-
>Android Application:
-This ran the map activity, but only displayed a grid
because the api key is designed to be used with a signed apk.
Running directly from eclipse installs an unsigned
package.
(I figured this was the case.)
-Then, I tried to install the apk via my web server and it spit out
a signature mismatch error.
-It also said it couldn't install the app in the app directory.
It turns out that running the application via eclipse on the phone and
then trying to install the apk triggers a signature error.
(I can only assume this is because the version run directly from
eclipse has no signature and the apk has a good one.
This conflict, I think, triggers an error. --invalid signature. The O/
S assumes the first signature is the good one?)
Solution:
I found the application via the settings manager and manually
uninstalled it.
It was identified as 'mymap.' (See Manifest Above)
Once I uninstalled it, the apk installed cleanly without any conflicts
and the map appeared .
Anyway, I hope this helps someone in the future.
It's Alive!
You guys are great,
Josh
On Dec 10, 6:23 am, Ludwig <[EMAIL PROTECTED]> wrote:
> I would assume that there is an additional check on the app that there is a
> map key for it on the phone that is not present in the emulator. Try it with
> a map key and see what happens on the phone.
> Ludwig
>
> 2008/12/10 joshbeck <[EMAIL PROTECTED]>
>
>
>
> > Problem:
> > -I have the simplest MapActivity known to Android. (Code Below)
> > -In Eclipse I run as->Android Application (G1 connected in debug
> > mode.)
> > -Works fine. Gray Grid is displayed.
> > -Once I export, sign, and download it to my phone as an apk it says:
> > -Install Successful!
> > -The 'LAUNCH' button is grayed out. (Can't launch it.)
> > -The application doesn't appear anywhere on the phone.
> > -I do have '3rd Party Apps' enabled.
> > Any help or insight is appreciated!
> > Thanks,
> > Josh Beck
>
> > Here is my code:
> > ----------------------
> > maptest.java
> > ----------------------
>
> > imports --ALL CORRECT--
>
> > public class maptest extends MapActivity {
> > protected MapView MyMapView = null;
> > [EMAIL PROTECTED]
> > public void onCreate(Bundle savedInstanceState) {
> > super.onCreate(savedInstanceState);
> > MyMapView = new MapView
> > (this,"MyApiKeyDerivedFromKeystoreMD5");
> > setContentView(MyMapView);
> > }
>
> > [EMAIL PROTECTED]
> > protected boolean isRouteDisplayed() { return false; }
> > }
>
> > -----------------
> > MANIFEST
> > ----------------
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <manifest xmlns:android="http://schemas.android.com/apk/res/android"
> > package="com.android.maptest">
>
> > <uses-permission android:name="android.permission.INTERNET" />
>
> > <application android:icon="@drawable/icon" android:label="mymap">
> > <uses-library android:name="com.google.android.maps" />
> > <activity android:name=".maptest" android:label="mymap1">
>
> > <intent-filter>
> > <action android:name="android.intent.action.MAIN" />
> > <category
> > android:name="android.intent.category.LAUNCHER" />
> > </intent-filter>
> > </activity>
> > </application>
> > </manifest>
>
> > Any idea why it would debug but not run when installed as an apk?
>
> > Thank you for any insight
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---