Langsung ke konten utama

Postingan

Contoh Firebase

gradle di Module dependencies { compile fileTree( dir : 'libs' , include : [ '*.jar' ]) androidTestCompile( 'com.android.support.test.espresso:espresso-core:2.2.2' , { exclude group : 'com.android.support' , module : 'support-annotations' }) compile 'com.android.support:appcompat-v7:24.2.1' compile 'com.android.support:recyclerview-v7:24.2.1' compile 'com.google.firebase:firebase-database:9.6.0' testCompile 'junit:junit:4.12' } apply plugin : 'com.google.gms.google-services' gradle di Project dependencies { classpath 'com.android.tools.build:gradle:2.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath 'com.google.gms:google-services:3.0.0' } Layout <? xml version= "1.0" encoding= "utf-8" ?> < LinearLayout xmlns: android =...
Postingan terbaru

contoh current location 2

layout < fragment xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: map = "http://schemas.android.com/apk/res-auto" 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" /> java package adehodijah.example.com.pertemuanmap; import android.content.pm.PackageManager; import android.location.Location; import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull ; import android.support.annotation.Nullable ; import android.support.v4.app.ActivityCompat; import android.support.v4.app.FragmentActivity; import android.support.v4.content.ContextCompat; import android.util.Log; import android.widget.Toast; import com.google.android.gms.common.ConnectionResult; import com.google.andro...

contoh current location 1

layout < 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" android:paddingLeft= "@dimen/activity_horizontal_margin" android:paddingRight= "@dimen/activity_horizontal_margin" android:paddingTop= "@dimen/activity_vertical_margin" android:paddingBottom= "@dimen/activity_vertical_margin" > < Button android:layout_alignParentTop= "true" android:layout_centerHorizontal= "true" android:id= "@+id/bt_getLocation" android:text= "Get Location" android:layout_width= "wrap_content" android:layout_height= "wrap_content" /> </ RelativeLayout > java package adehodijah.example.com.pertemuanmap; import android.locatio...

contoh service

layout <? xml version= "1.0" encoding= "utf-8" ?> < LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" android :layout_width= "fill_parent" android :layout_height= "fill_parent" android :orientation= "vertical" > < Button android :id= "@+id/btnStartService" android :layout_width= "fill_parent" android :layout_height= "wrap_content" android :onClick= "startService" android :text= "Start Service" /> < Button android :id= "@+id/btnStopService" android :layout_width= "fill_parent" android :layout_height= "wrap_content" android :onClick= "stopService" android :text= "Stop Service" /> </ LinearLayout > service package com.example.adehodijah.myservice; /** * Created by AdeHod...

Pertemuan MAP lokasi terdekat

compile 'com.google.android.gms:play-services-maps:9.6.0' compile 'com.google.android.gms:play-services-location:9.6.0' https://maps.googleapis.com/maps/api/place/search/json?location=-6.8729758,107.5332892&radius=200&types=restaurant&sensor=true&key=AIzaSyC99GN2-5Seu8nqOh8GhGO_aGIk-wqQHv8 Layout < fragment xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: map = "http://schemas.android.com/apk/res-auto" 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" /> Java package adehodijah.example.com.pertemuanmap; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.util.Log; import android.widget.Toast; import ...

Pertemuan MAP garis

https://console.developers.google.com https://jsoneditoronline.org/ https://maps.googleapis.com/maps/api/directions/json?origin=-6.8729758,107.5332892&destination=-6.9203738,107.5982842&sensor=false Layout < fragment xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: map = "http://schemas.android.com/apk/res-auto" 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" /> Java package adehodijah.example.com.pertemuanmap; import android.graphics.Color; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.util.Log; import android.widget.Toast; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps...