Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: help with google maps starter

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy help with google maps starter

    Hi, i'm new with android and google maps i play google maps when i clic on a button but it showin me that :

    Sans_titre.jpg

    please help how can i do

    thanks a lot


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,644
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: help with google maps starter

    Welcome devzero

    You can find a button sample on android's website. Make an app where the button opens a toast. When that is working you can work on opening maps. Post your code and any error messages you may have with your question if you have problems.

  3. #3
    Junior Member
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Re: help with google maps starter

    Quote Originally Posted by jps View Post
    Welcome devzero

    You can find a button sample on android's website. Make an app where the button opens a toast. When that is working you can work on opening maps. Post your code and any error messages you may have with your question if you have problems.


    Thanks for replay: i have done with this now :

    mapsactivity.java :

    package com.example.visite;
     
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.Menu;
    import android.support.v4.app.FragmentActivity;
    import com.google.android.gms.maps.CameraUpdateFactory;
    import com.google.android.gms.maps.GoogleMap;
    import com.google.android.gms.maps.MapFragment;
    import com.google.android.gms.maps.model.BitmapDescriptorFactory;
    import com.google.android.gms.maps.model.LatLng;
    import com.google.android.gms.maps.model.Marker;
    import com.google.android.gms.maps.model.MarkerOptions;
     
    public class mapsactivity extends Activity {
      static final LatLng HAMBURG = new LatLng(53.558, 9.927);
      static final LatLng KIEL = new LatLng(53.551, 9.993);
      private GoogleMap map;
     
      @Override
      protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mapsactivity);
     
      }
     
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
      }
     
    }

    mapsactivity.xml

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity" >
     
        <fragment
     
            android:id="@+id/map"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            class="com.google.android.gms.maps.MapFragment" />
     
    </RelativeLayout>

    and it result a page with button update and message : "this app won't run unless you update google play services"

    Thanks for help

  4. #4
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,644
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: help with google maps starter

    Quote Originally Posted by devzero View Post
    "this app won't run unless you update google play services"
    import com.google....
    Your app uses google goodies. If there is a new TOS or update to the tools, all users of your app must agree to google TOS and update.
    Launch the play store app and you should be prompted to accept TOS and update.
    Then try to run your app again

Similar Threads

  1. Google maps v2 issues
    By justyStepi in forum Android Development
    Replies: 0
    Last Post: March 20th, 2013, 15:33
  2. How to use google maps in a frame and get string
    By Nesh108 in forum Java Theory & Questions
    Replies: 26
    Last Post: November 29th, 2012, 10:27
  3. Google Maps
    By Jyothi in forum Other Programming Languages
    Replies: 1
    Last Post: May 14th, 2012, 07:46
  4. Simple Google Maps like Image viewer in Java
    By javaguy2020 in forum What's Wrong With My Code?
    Replies: 26
    Last Post: December 7th, 2011, 22:46
  5. JAVA and Google Maps
    By aussiemcgr in forum Java Theory & Questions
    Replies: 7
    Last Post: February 1st, 2011, 19:57

Tags for this Thread