Vous êtes sur la page 1sur 21

Ex. No.

: 7 Preferences and Menus


Date: 27-02-2018

Aim: ​To develop an Android app that implements Preferences, settings and various menus.

Description of the App:


This app displays details of pets in a pets shop. It implements several menu types and preferences
that allows the user to have customized settings.
Device Specification:
Device: Lenovo-k8-Note(5.5’ screen)
Platform: Android 7.0

Technical Concepts Studied in this Exercise:


1. Study of menus.
2. Implementation various types of menus available.
3. Study of Preferences.
4. Implementation various types of preferences available.
5. Managing customized settings through different session of an app.

Source Code:
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.ankitj.lab_7.MainActivity"
tools:showIn="@layout/activity_main">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/image"
android:layout_gravity="center_horizontal"
android:visibility="visible"
android:src="@drawable/pug"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:id="@+id/contentPanel"
android:text="PUG"
android:layout_alignParentTop="true"
android:visibility="gone"/>
<TextView
android:id="@+id/cont"
android:padding="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/pug"
android:layout_below="@+id/image"
android:layout_marginTop="40dp"
android:visibility="visible"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/user_text"
android:text="Hello User!"
android:layout_above="@+id/tv"
android:textSize="30dp"/>
<TextView
android:id="@+id/tv"
android:layout_width="match_parent"
android:layout_height="55dp"
android:textColor="#ffffff"
android:padding="20dp"
android:text="LIKE IT!?"
android:layout_alignParentBottom="true"
android:background="@color/colorPrimaryDark"/>

</RelativeLayout>

content_menu.xml

<?xml version="1.0" encoding="utf-8"?>


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.ankitj.lab_7.MainActivity"
tools:showIn="@layout/activity_main">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/image"
android:layout_gravity="center_horizontal"
android:visibility="visible"
android:src="@drawable/pug"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="15sp"
android:id="@+id/contentPanel"
android:text="PUG"
android:visibility="gone"/>
<TextView
android:id="@+id/cont"
android:padding="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/pug"
android:layout_below="@+id/image"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:visibility="visible"/>
<TextView
android:id="@+id/tv"
android:layout_width="match_parent"
android:layout_height="55dp"
android:textColor="#ffffff"
android:padding="20dp"
android:text="LIKE IT!?"
android:layout_alignParentBottom="true"
android:background="@color/colorPrimaryDark"/>

</RelativeLayout>

activity_settings.xml
?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.ankitj.lab_7.Settings">

</android.support.constraint.ConstraintLayout>

ssettings_frag.xml
<FrameLayout 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="com.example.ankitj.lab_7.Settings_frag">

<!-- TODO: Update blank fragment layout -->


<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />

</FrameLayout>

layout/activity_about.xml:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.ankitj.lab_7.about">

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />

</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_about" />
</android.support.design.widget.CoordinatorLayout>

content_about.xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.ankitj.lab_7.about"
tools:showIn="@layout/activity_about">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textSize="25sp"
android:textColor="#000000"/>

</RelativeLayout>

preferences.xml:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

<CheckBoxPreference
android:defaultValue="false"
android:key="italiac"
android:title="Font-Italic"
/>
<ListPreference
android:defaultValue="image"
android:entries="@array/theme_labels"
android:entryValues="@array/theme_values"
android:key="display"
android:title="Display"/>
<EditTextPreference
android:defaultValue="User"
android:key="name"
android:title="Your Name"/>
</PreferenceScreen>

array.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="theme_labels" >
<item>Image_display</item>
<item>Content_display</item>
</array>
<array name="theme_values">
<item>image</item>
<item>content</item>
</array>
</resources>

strings.xml:
<resources>
<string name="app_name">PETS</string>
<string name="action_settings">Settings</string>
<string name="pug">age : 10
cost: 100$</string>

<!-- TODO: Remove or change this placeholder text -->


<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="title_activity_about">About</string>
</resources>

colors.xml:
<resources>
<string name="app_name">PETS</string>
<string name="action_settings">Settings</string>
<string name="pug">age : 10
cost: 100$</string>

<!-- TODO: Remove or change this placeholder text -->


<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="title_activity_about">About</string>
</resources>

styles.xml:
<resources>

<!-- Base application theme. -->


<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>

</style>

<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.AppBarOverlay"
parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>

MainActivity.java:
package com.example.ankitj.lab_7;

import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;

import android.support.v7.widget.PopupMenu;
import android.support.v7.widget.Toolbar;
import android.text.SpannableString;
import android.text.style.StyleSpan;
import android.view.ActionMode;
import android.view.MenuInflater;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity implements


SharedPreferences.OnSharedPreferenceChangeListener {
TextView cont ,tv_hello,content_panel;
ImageView imageView;
private ActionMode mActionMode;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
cont = findViewById(R.id.cont);
content_panel =findViewById(R.id.contentPanel);
imageView = findViewById(R.id.image);
tv_hello = findViewById(R.id.user_text);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton)
findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Snackbar.make(view, "Replace with your own action",
Snackbar.LENGTH_LONG)
// .setAction("Action", null).show();
Intent i = new Intent(MainActivity.this,Settings.class);
startActivity(i);
}
});

setUpSharedPreferences();
TextView textView = (TextView) findViewById(R.id.tv);

textView.setOnLongClickListener(new View.OnLongClickListener() {
// Called when the user long-clicks on someView
public boolean onLongClick(View view) {
if (mActionMode != null) {
return false;
}
mActionMode =
MainActivity.this.startActionMode(mActionModeCallback);
view.setSelected(true);
return true;
}
});

private ActionMode.Callback mActionModeCallback = new ActionMode.Callback()


{
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.context_menu, menu);
return true;
}

@Override
public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {

return false;

@Override
public boolean onActionItemClicked(ActionMode actionMode, MenuItem
menuItem) {
switch (menuItem.getItemId()) {
case R.id.yes:
Toast.makeText(getApplicationContext(), "Thanks for
liking!", Toast.LENGTH_SHORT).show();
actionMode.finish(); // Action picked, so close the CAB
return true;
case R.id.no:
Toast.makeText(getApplicationContext(), "We'll try to
improve", Toast.LENGTH_SHORT).show();
actionMode.finish(); // Action picked, so close the CAB
return true;

default:
return false;
}

@Override
public void onDestroyActionMode(ActionMode actionMode) {
mActionMode = null;
}
};

public void setUpSharedPreferences(){


SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(this);

setItalic(sharedPreferences.getBoolean("italiac",true));
setMydisplay(sharedPreferences.getString("display","image"));
setMyName(sharedPreferences.getString("name","User"));

sharedPreferences.registerOnSharedPreferenceChangeListener(this);
}

private void setItalic(boolean b) {


SpannableString spannableString = new
SpannableString(cont.getText().toString());

if(b)
spannableString.setSpan(new
StyleSpan(Typeface.ITALIC),0,spannableString.length(),0);
else
spannableString.setSpan(new
StyleSpan(Typeface.NORMAL),0,spannableString.length(),0);
cont.setText(spannableString);
}

public void setMydisplay(String val){


if(val.equals("image")){
content_panel.setVisibility(View.GONE);
imageView.setVisibility(View.VISIBLE);
}
if (val.equals("content")){
imageView.setVisibility(View.GONE);
content_panel.setVisibility(View.VISIBLE);
}

}
public void setMyName(String myName){
tv_hello.setText("Hello "+myName+ "!");
}

@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String s) {
if(s.equals("italiac"))
{
setItalic(sharedPreferences.getBoolean("italiac",true));
}
if(s.equals("display")){
setMydisplay(sharedPreferences.getString("display","image"));
}
if(s.equals("name")){
setMyName(sharedPreferences.getString("name","User"));
}
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id)
{
case R.id.about:
openabout();
return true;

case R.id.popupmenu:
popupmenu_implementation(id);
return true;

default:
return super.onOptionsItemSelected(item);
}
}

public void openabout(){


Intent i = new Intent(MainActivity.this,about.class);
startActivity(i);
}

public void popupmenu_implementation(int id){


PopupMenu popupMenu = new PopupMenu(this,findViewById(id));

popupMenu.getMenuInflater().inflate(R.menu.popupmenu,popupMenu.getMenu());
popupMenu.setOnMenuItemClickListener(new
PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {

if(item.getTitle().toString().equals("Pug")){
imageView.setImageResource(R.drawable.pug);
content_panel.setText("PUG");
}
else if (item.getTitle().toString().equals("Poodle")){
imageView.setImageResource(R.drawable.poodle);
content_panel.setText("POODLE");
}

Toast.makeText(MainActivity.this,"Chose"+item.getTitle(),Toast.LENGTH_LONG).show
();
return true;
}
});
popupMenu.show();
}
}

About.java:
package com.example.ankitj.lab_7;
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.View;

public class about extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

@Override
public boolean onCreateOptionsMenu(Menu menu) {
return super.onCreateOptionsMenu(menu);
}

@Override
public void onBackPressed() {
super.onBackPressed();
}
}

Settings.java:
package com.example.ankitj.lab_7;

import android.content.SharedPreferences;
import android.preference.PreferenceActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.SharedPreferencesCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.preference.PreferenceFragmentCompat;

public class Settings extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);

//getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeL
istener(this);
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
ft.replace(android.R.id.content,new Settings_frag());
ft.commit();
}

Settings_frag.java:
package com.example.ankitj.lab_7;

import android.content.Context;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.app.Fragment;
import android.support.v7.preference.CheckBoxPreference;
import android.support.v7.preference.EditTextPreference;
import android.support.v7.preference.ListPreference;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceFragmentCompat;
import android.support.v7.preference.PreferenceScreen;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class Settings_frag extends PreferenceFragmentCompat implements


SharedPreferences.OnSharedPreferenceChangeListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeLis
tener(this);
}

@Override
public void onDestroy() {
super.onDestroy();

getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeL
istener(this);
}

@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.preferences);
PreferenceScreen ps = getPreferenceScreen();
SharedPreferences sp = ps.getSharedPreferences();
int i;
int count = ps.getPreferenceCount();
for(i=0;i<count;i++){
Preference p = ps.getPreference(i);
if(!(p instanceof CheckBoxPreference)){
String val = sp.getString(p.getKey(),"");
setPreference(val,p);
}
}

}
private void setPreference(String val,Preference p){
if(p instanceof ListPreference){
ListPreference lp = (ListPreference) p;
int prefindex = lp.findIndexOfValue(val);
if(prefindex>=0){
lp.setSummary(lp.getEntries()[prefindex]);
}
}
else if(p instanceof EditTextPreference){
p.setSummary(val);
}
}

@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String s) {
Preference p = findPreference(s);
if(p!=null){
if(!(p instanceof CheckBoxPreference)){
String val = sharedPreferences.getString(p.getKey(),"");
setPreference(val,p);
}
}
}
}
Output:
Result:
Android app that implements preferences and menus is successfully implemented is created.
Ex. No.: 8 Application Using Google Maps API
Date: 05-03-2018

Aim: ​To develop an Android app that using Google Maps API to search for a location and get its
address details.

Description of the App:


This app uses Google Maps API to locate various locations in the map and get all information
required about their locations in a marker.
Device Specification:
Device: Lenovo-k8-Note(5.5’ screen)
Platform: Android 7.0

Technical Concepts Studied in this Exercise:


6. Using Google Maps API.
7. Learning about the various Classes like Markers, LatLng etc.
8. Managing customized settings through different session of an app.

Source Code:
activity_front.xml
<LinearLayout android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android">

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"

/>
<fragment
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.mapwithmarker.MapsMarkerActivity" />

</LinearLayout>
activity_maps.xml
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.mapwithmarker.MapsMarkerActivity" />

MainActivity.java
package com.ankitj5014;

import android.location.Address;
import android.location.Geocoder;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.Toast;

import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
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;

import java.io.IOException;
import java.util.List;
import java.util.Locale;

/**
* An activity that displays a Google map with a marker (pin) to indicate a
particular location.
*/
public class MapsMarkerActivity extends AppCompatActivity
implements OnMapReadyCallback, GoogleMap.OnMapClickListener {

public GoogleMap googleMap;


public String location;
public Marker marker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Retrieve the content view that renders the map.
setContentView(R.layout.activity_maps);
// Get the SupportMapFragment and request notification
// when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment)
getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}

/**
* Manipulates the map when it's available.
* The API invokes this callback when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the
camera. In this case,
* we just add a marker near Sydney, Australia.
* If Google Play services is not installed on the device, the user receives
a prompt to install
* Play services inside the SupportMapFragment. The API invokes this method
after the user has
* installed Google Play services and returned to the app.
*/
@Override
public void onMapReady(GoogleMap googleMap) {
// Add a marker in Sydney, Australia,
// and move the map's camera to the same location.
this.googleMap = googleMap;
this.googleMap.setOnMapClickListener(this);
}

@Override
public void onMapClick(LatLng latLng) {
getAddress(latLng.latitude, latLng.longitude, latLng);
}

public void getAddress(double lat, double lng, LatLng latLng) {


Geocoder geocoder = new Geocoder(this, Locale.getDefault());
try {
List<Address> addresses = geocoder.getFromLocation(lat, lng, 1);
Address obj = addresses.get(0);
String add = obj.getAddressLine(0);
add = add + "\n" + obj.getCountryName();
add = add + "\n" + obj.getCountryCode();
add = add + "\n" + obj.getAdminArea();
add = add + "\n" + obj.getPostalCode();
add = add + "\n" + obj.getSubAdminArea();
add = add + "\n" + obj.getLocality();
add = add + "\n" + obj.getSubThoroughfare();
Log.i("IGA", "Address" + add);
location = add;

if(marker!=null){
marker.remove();
}
marker = googleMap.addMarker(new MarkerOptions().position(latLng)
.title(location));

CameraUpdate zoom = CameraUpdateFactory.zoomTo(10);


googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
googleMap.animateCamera(zoom);
// Toast.makeText(this, "Address=>" + add,
// Toast.LENGTH_SHORT).show();

// TennisAppActivity.showDialog(add);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
}
GradleProperties:
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:


# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit


# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.


# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.


# This option should only be used with decoupled projects. More details, visit
#
http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decou
pled_projects
# org.gradle.parallel=true

# Replace the value below with your own Google API key for Android app.
# You can get an API key by clicking "Get a Key" on the Google Maps Android API
developer's site.
# https://developers.google.com/maps/documentation/android-api/start
GOOGLE_MAPS_API_KEY=AIzaSyCl8MvfD6YhmeXmLuURDPU363ZUB2PWaSY

Output:

Result:
Android app that implements preferences and menus is successfully implemented is created.

Vous aimerez peut-être aussi