Android Tutorial (old) Google Maps Android v2 tutorial

Discussion in 'Tutorials & Examples' started by Erel, Dec 18, 2012.

Thread Status:
Not open for further replies.
  1. Erel

    Erel Administrator Staff Member Licensed User

    This means that Google Play Services are not installed on the device. Go to Google Play and update / install Google Play Services.
     
  2. iCAB

    iCAB Well-Known Member Licensed User

    That's what I suspected, however I didn't want to do that before I follow up with my next question.
    So if I am releasing and app that uses google maps, what are my options to simplify the process for the end user?
    Is there a way to auto invoke the installation of google play services when installing our app? I am sure many end users will appreciate this. Otherwise it might look like the app doesn't work and end the user will uninstall and never come back.

    Please clarify
     
    Last edited: Dec 6, 2015
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. iCAB

    iCAB Well-Known Member Licensed User

    Thank you
     
  5. mattdarnell

    mattdarnell Member Licensed User

    Precompiled APK will start but there is no marker, is this normal for a Note 4?

    Google play services is installed and there maps appears updates.

    Thanks
     

    Attached Files:

  6. Erel

    Erel Administrator Staff Member Licensed User

  7. mattdarnell

    mattdarnell Member Licensed User

    Thank you, the picture in an earlier post shows a pin so I thought there should be one in the sample app.

    -Matt
     
  8. Indy

    Indy Active Member Licensed User

    Hi,

    I don't know if I've done something wrong or left something out but, whenever I try and compile a project with maps the dialog just stops at
    Code:
    Convert byte code - optimized dex.
    Eventually after the timeout occurs I get the following message.
    Code:
    UNEXPECTED TOP-LEVEL ERROR:

    java.lang.OutOfMemoryError: GC overhead limit exceeded
    I have already increased the timeout from 60s to 180s. Any ideas where I've gone wrong?

    Thanks
     
  9. Erel

    Erel Administrator Staff Member Licensed User

  10. Indy

    Indy Active Member Licensed User

    Perfect! Don't know why the forum search didn't show this post. I'll get this increased.

    Is there any documentation for this library? I need to know what methods are available, in particular if there is anything for zooming in/out via code and also adding/removing markers.

    Thanks.
     
  11. warwound

    warwound Expert Licensed User

    http://www.b4x.com/android/help/googlemaps.html
     
    lemonisdead likes this.
  12. Indy

    Indy Active Member Licensed User

    Thank you. Funny thing is, I remember seeing this help section when I got introduced to B4A when the site was Basic4Android but, never could find it when it went over to B4X site. I think the layout has changed quite a bit and I haven't farmiliarised myself with it.

    Anyway, thanks again for the url.
     
  13. warwound

    warwound Expert Licensed User

  14. Indy

    Indy Active Member Licensed User

    Hi All,

    Does this library have a Zoom In/Out event? If not, how can this be acheived? I have the map up and running ad set an initial zoom value of 17 but, I would like to retain the value of the zoom when the Lat/Long is set manually.

    Thanks
     
  15. warwound

    warwound Expert Licensed User

  16. Indy

    Indy Active Member Licensed User

    Perfect! Thank you very much.
     
  17. pal57

    pal57 Member Licensed User

    Hi,
    I have this error while compiling from B4A:


    B4A version: 5.50
    Parsing code. (0.00s)
    Compiling code. (0.03s)
    Compiling layouts code. (0.00s)
    Generating R file. Error
    c:\android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.

    My Manifest is:

    'This code will be applied to the manifest file during compilation.
    'You do not need to modify it in most cases.
    'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
    AddManifestText(
    <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="14"/>
    <supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
    AddManifestText( <permission
    android:name="$PACKAGE$.permission.MAPS_RECEIVE"
    android:protectionLevel="signature"/>
    <uses-feature android:glEsVersion="0x00020000" android:required="true"/>)
    AddApplicationText(<meta-data
    android:name="com.google.android.gms.version"
    android:value="@Integer/google_play_services_version" />)
    AddApplicationText(<meta-data
    android:name="com.google.android.maps.v2.API_KEY"
    android:value="AIzaSyBIclOSVBCL9by21c7Siz8mYOyp5I_7M_w"/>
    <meta-data android:name="com.google.android.gms.version"
    android:value="@Integer/google_play_services_version"
    />)
    AddPermission(android.permission.ACCESS_NETWORK_STATE)
    SetApplicationAttribute(android:icon, "@drawable/icon")
    SetApplicationAttribute(android:label, "$LABEL$")
    SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
    'End of default text.



    I downloaded your apk and it all works fine.

    Don't know what am I doing wrong.

    Thankx
    Pal57
     
    Last edited: Dec 29, 2015
  18. pal57

    pal57 Member Licensed User

    Sorry but this is the real Manifest in my apk:

    'This code will be applied to the manifest file during compilation.
    'You do not need to modify it in most cases.
    'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
    AddManifestText(
    <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="14"/>
    <supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
    AddManifestText( <permission
    android:name="$PACKAGE$.permission.MAPS_RECEIVE"
    android:protectionLevel="signature"/>
    <uses-feature android:glEsVersion="0x00020000" android:required="true"/>)
    AddApplicationText(<meta-data
    android:name="com.google.android.gms.version"
    android:value="@Integer/google_play_services_version" />)
    AddApplicationText(<meta-data
    android:name="com.google.android.maps.v2.API_KEY"
    android:value="AIzaSyBIclOSVBCL9by21c7Siz8mYOyp5I_7M_w"/>
    <meta-data android:name="com.google.android.gms.version"
    android:value="@Integer/google_play_services_version"
    />)
    AddPermission(android.permission.ACCESS_NETWORK_STATE)
    SetApplicationAttribute(android:icon, "@drawable/icon")
    SetApplicationAttribute(android:label, "$LABEL$")
    SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
    'End of default text.

    Pal57
     
  19. pal57

    pal57 Member Licensed User

    Sorry but don't know why when I copy and past my manifest text, it shows up all messed up in my reply.
    Pal57
     
  20. pal57

    pal57 Member Licensed User

    Here I attach my manifest file in png format.

    Sorry for the trouble.

    Pal57
     

    Attached Files:

Thread Status:
Not open for further replies.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice