Android Tutorial Google Maps

Status
Not open for further replies.

Powie

Member
Licensed User
Longtime User
Hello, today I started to upgrade all libraries of our MADB project. I'm in problems in upgrading also the GoogleMaps libraries.... I think configuration of libraries, manifest and so on is OK, the map is displayed...

The issue for me ist that ( based on the tutorial code) MapFragment1_Ready() isn't triggered.
So I tried this also on the way to make a clean app with only the code from post1, struggling also with the same issue.
Triggered is Map_CameraChange...

Do I miss anything?
 

Powie

Member
Licensed User
Longtime User
Yes, I can confirm this. mapready was ignored, because after starting the activity I show a logo screen.

If I disable the intro and the activity map_ready works as designed.
 

ldb68

Member
Licensed User
Longtime User
How I can get from the map the current direction of the user (compass)?
I need the direction shown by the compass in the map without having to use the sensors directly (that gives me very mixed results).
thanks
 

Yayou49

Active Member
Licensed User
V5.80
Hi everybody,

Even after a long read of all requests of this thread, I didn't found a solution to my problem.
I've installed Google Play service Rev 39 in my SDK directory:

- No way to find google-play-services.jar in any of my drives
- you said to add a res like "<android sdk>\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms"
but if I look into my directory "<android sdk>\extras\google\google_play_services\" I have only 2 sub directories: (docs & samples)

What's wrong ???....

Thanks in advance.
 

MarcoRome

Expert
Licensed User
Longtime User

Look THIS
My suggestion "Is time to switch Rel. B4A 6.80"
 

Yayou49

Active Member
Licensed User
Nice shot Marco !!!
Seems to work, in debug mode, it's compliling .... until "Installing file to device", I get this error:

XXXXX_RAPID_DEBUG.apk: 1 file pushed. 8.7 MB/s (2777756 bytes in 0.304s)
pkg: /data/local/tmp/XXXXX_RAPID_DEBUG.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

Here is my manifest. If I remove the 2 first addManifestText, no more compiling error:

AddManifestText(<permission
android:name="$PACKAGE$.permission.MAPS_RECEIVE"
androidrotectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>)
AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyA0kIYq2_tvkxxxxxxxxxxxxxxx-0"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@Integer/google_play_services_version" />)


AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.flash" android:required="false" />)
'AddPermission("android.permission.ACCESS_COARSE_LOCATION")
AddManifestText(<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />)
AddPermission("android.permission.INTERNET")
'AddPermission("android.permission.ACCESS_FINE_LOCATION")
'AddPermission("android.permission.WAKE_LOCK")
'AddPermission("android.permission.DEVICE_POWER")
'AddPermission("android.permission.ACCESS_COARSE_UPDATES")
AddPermission("android.permission.READ_PHONE_STATE")
'AddPermission("android.permission.VIBRATE")
AddPermission("android.permission.CAMERA")
AddPermission("android.permission.FLASHLIGHT")
AddPermission("android.hardware.camera")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")


Any idea ?
 

evbedp

Member
Licensed User
Longtime User
Dear Erel,

could you help me to solve this one?.. i got this error when i call this code .getMap()

i'm using B4A 6.80

B4X:
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.NoSuchMethodError: No virtual method getMap()Lcom/google/android/gms/maps/GoogleMap; in class Lanywheresoftware/b4a/objects/MapFragmentWrapper$MyMapFragment; or its super classes (declaration of 'anywheresoftware.b4a.objects.MapFragmentWrapper$MyMapFragment' appears in /data/app/e.moto.workshop-1/base.apk)
    at anywheresoftware.b4a.objects.MapFragmentWrapper.GetMap(MapFragmentWrapper.java:132)
    at e.moto.workshop.main._gm_ready(main.java:943)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:163)
    at anywheresoftware.b4a.objects.MapFragmentWrapper$MyMapFragment.onViewCreated(MapFragmentWrapper.java:191)
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:913)
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1072)
    at android.app.BackStackRecord.run(BackStackRecord.java:852)
    at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1488)
    at android.app.FragmentManagerImpl$1.run(FragmentManager.java:452)
    at android.os.Handler.handleCallback(Handler.java:815)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loop(Looper.java:210)
    at android.app.ActivityThread.main(ActivityThread.java:5833)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1113)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:879)
 

evbedp

Member
Licensed User
Longtime User

i got this error when update google play service in Android SDK manajer to Rev 39. could you help me?

my project is work before i'm update google play service.
 

evbedp

Member
Licensed User
Longtime User
B4X:
PackageAdded: package:e.moto.workshop~i:** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
android.content.res.Resources$NotFoundException: Unable to find resource ID #0x26
    at android.content.res.Resources.getResourceName(Resources.java:2442)
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:891)
    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1072)
    at android.app.BackStackRecord.run(BackStackRecord.java:852)
    at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1488)
    at android.app.FragmentManagerImpl$1.run(FragmentManager.java:452)
    at android.os.Handler.handleCallback(Handler.java:815)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loop(Looper.java:210)
    at android.app.ActivityThread.main(ActivityThread.java:5833)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1113)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:879)
 
Status
Not open for further replies.

Similar Threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…