Luca Brr
Luca Brr

Reputation: 87

Mapping natively not working in my phone android

I'm developing a simple app with codename one on netbeans, and everything goes ok on the simulator, but the maps doesn't show at all in my phone android... I followed all the instructions I found about this topic (the build hints are ok, the API KEY is ok, etc), but it still doesn't work... Does anyone can tell me if I'm missing something?

    //add the map to the form 
    cnt = new MapContainer(HTML_API_KEY);
    formTUTTO.addComponent(cnt);

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Filtering with the word "google" these are the log lines that appear while I'm launching the app from my mobile:

12-15 20:09:09.749: W/BroadcastQueue(839): Permission Denial: broadcasting Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } from com.android.launcher3 (pid=2776, uid=10019) requires com.google.android.launcher.permission.RECEIVE_LAUNCH_BROADCASTS due to receiver com.google.android.googlequicksearchbox/com.google.android.apps.gsa.search.core.icingsync.ApplicationLaunchReceiver

12-15 20:09:09.749: W/BroadcastQueue(839): Permission Denial: broadcasting Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } from com.android.launcher3 (pid=2776, uid=10019) requires com.google.android.launcher.permission.RECEIVE_LAUNCH_BROADCASTS due to receiver com.google.android.gms/.icing.proxy.ApplicationLauncherReceiver

12-15 20:09:09.750: W/BroadcastQueue(839): Permission Denial: receiving Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$GmsExternalReceiver requires com.android.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS due to sender com.android.launcher3 (uid 10019)

12-15 20:09:11.270: W/System(1983): ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/00000031/n/armeabi

12-15 20:09:11.461: I/Google Maps Android API(1983): Google Play services client version: 9452000

12-15 20:09:11.487: I/Google Maps Android API(1983): Google Play services package version: 11951436

12-15 20:09:12.143: I/Google Maps Android API(1983): Google Play services package version: 11951436

12-15 20:09:14.154: W/DynamiteModule(1983): Local module descriptor class for com.google.android.gms.googlecertificates not found.

12-15 20:09:14.155: W/DynamiteModule(1983): Failed to load module via V2: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.dynamite.DynamiteModule$DynamiteLoaderClassLoader" on path: DexPathList[[zip file "/data/app/com.mycompany.myapp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.mycompany.myapp-2/lib/arm, /vendor/lib, /system/lib]]

12-15 20:09:14.214: I/DynamiteModule(1983): Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:4

12-15 20:09:14.214: I/DynamiteModule(1983): Selected remote version of com.google.android.gms.googlecertificates, version >= 4

12-15 20:09:14.255: W/System(1983): ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/0000002f/n/armeabi-v7a

12-15 20:09:14.256: W/System(1983): ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/0000002f/n/armeabi

12-15 20:09:14.335: W/ConfigurationChimeraPro(2569): Caller is not authorized to access Uri: content://com.google.android.gms.phenotype/com.google.android.gms.clearcut.public

Upvotes: 1

Views: 373

Answers (2)

Luca Brr
Luca Brr

Reputation: 87

Ok, I solved it... It wasn.t a problem of API. I just added this row in my code:

formTUTTO.setLayout(new BorderLayout());

And I added the argument BorderLayout in the following row:

formTUTTO.addComponent(BorderLayout.CENTER,cnt);

Now everything works fine :) CiaoCiao, and thanks for the help...

Upvotes: 0

Shai Almog
Shai Almog

Reputation: 52770

It looks like you used the API key from JavaScript for the native Android integration. You need to activate the native Android and native iOS SDK's and use the keys that are given there.

Upvotes: 0

Related Questions