0
Android                      Android Training Part 2                            RGUIG Saad - AIMAFlundi 21 janvier 13     ...
Android                              Morning Program :                      1. Acess and permissions                      ...
Acess and permissions         Android                      Permissions in Manifest          A basic Android application ha...
Acess and permissions                             Android                      Sample permissins in Manifest        <uses-...
Acess and permissions    Android                      Sample permissins in Manifestlundi 21 janvier 13                    ...
Acess and permissions    Android                      Sample permissins in Manifestlundi 21 janvier 13                    ...
Acess and permissions   Android                      Sample permissinslundi 21 janvier 13                                 ...
Layout and screens   Android                      Sample permissinslundi 21 janvier 13                                   8
Layout and screens   Android                      View Hierarchylundi 21 janvier 13                                  9
Layout and screens   Android                          Demolundi 21 janvier 13                                  10
Map and Geolocation   Android                        Introductionlundi 21 janvier 13                                   11
Map and Geolocation                 Android                        Steps of implementation      Add Map Library and       ...
Map and Geolocation                 Android                        Steps of implementation      Add Map Library and       ...
Map and Geolocation                 Android                               Steps of implementation        Map Layout       ...
Map and Geolocation                 Android                               Steps of implementation        MapActivity      ...
Map and Geolocation                 Android                               Steps of implementation        MapActivity      ...
Map and Geolocation    Android                      Steps of implementation      Make sure      Build target       is of t...
Map and Geolocation         Android                       Get Google Map Key           https://developers.google.com/maps/...
Map and Geolocation   Android                      Get Google Map Keylundi 21 janvier 13                                  ...
Map and Geolocation   Android                         App installlundi 21 janvier 13                                   20
Map and Geolocation                             Android                       Steps of implementation        Marker     //...
Map and Geolocation   Android                        ScreenShotlundi 21 janvier 13                                   22
Androidlundi 21 janvier 13             23
Upcoming SlideShare
Loading in...5
×

Formation aimaf-android-part2

395

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
395
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Formation aimaf-android-part2"

  1. 1. Android Android Training Part 2 RGUIG Saad - AIMAFlundi 21 janvier 13 1
  2. 2. Android Morning Program : 1. Acess and permissions 2. Layouts and screens 3. Maps and geolocation 4. Implementation of Geolocation applundi 21 janvier 13 2
  3. 3. Acess and permissions Android Permissions in Manifest A basic Android application has no permissions associated with it by default, meaning it can not do anything that would adversely impact the user experience or any data on the device. To make use of protected features of the device, you must include in your AndroidManifest.xml one or more <uses- permission> tags declaring the permissions that your application needs.lundi 21 janvier 13 3
  4. 4. Acess and permissions Android Sample permissins in Manifest <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <permission android:name="lu.luxauto.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="lu.luxauto.permission.C2D_MESSAGE" /> <!-- App must have this permission to use the library --> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.CALL_PHONE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="com.android.vending.BILLING" />lundi 21 janvier 13 4
  5. 5. Acess and permissions Android Sample permissins in Manifestlundi 21 janvier 13 5
  6. 6. Acess and permissions Android Sample permissins in Manifestlundi 21 janvier 13 6
  7. 7. Acess and permissions Android Sample permissinslundi 21 janvier 13 7
  8. 8. Layout and screens Android Sample permissinslundi 21 janvier 13 8
  9. 9. Layout and screens Android View Hierarchylundi 21 janvier 13 9
  10. 10. Layout and screens Android Demolundi 21 janvier 13 10
  11. 11. Map and Geolocation Android Introductionlundi 21 janvier 13 11
  12. 12. Map and Geolocation Android Steps of implementation Add Map Library and User Permissions <uses-permission android:name="android.permission.INTERNET"/> <uses-library android:name="com.google.android.maps"/>lundi 21 janvier 13 12
  13. 13. Map and Geolocation Android Steps of implementation Add Map Library and User Permissions <uses-permission android:name="android.permission.INTERNET"/> <uses-library android:name="com.google.android.maps"/>lundi 21 janvier 13 13
  14. 14. Map and Geolocation Android Steps of implementation Map Layout <?xml version="1.0" encoding="utf-8"?> <com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="true" android:apiKey="My Map Key" />lundi 21 janvier 13 14
  15. 15. Map and Geolocation Android Steps of implementation MapActivity public class MainActivity extends MapActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); MapView mapView = (MapView) findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true); }lundi 21 janvier 13 15
  16. 16. Map and Geolocation Android Steps of implementation MapActivity public class MainActivity extends MapActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); MapView mapView = (MapView) findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true); }lundi 21 janvier 13 16
  17. 17. Map and Geolocation Android Steps of implementation Make sure Build target is of type Google APIlundi 21 janvier 13 17
  18. 18. Map and Geolocation Android Get Google Map Key https://developers.google.com/maps/documentation/ android/v1/mapkey?hl=fr#getdebugfingerprint https://developers.google.com/maps/documentation/ android/v1/maps-api-signup?hl=frlundi 21 janvier 13 18
  19. 19. Map and Geolocation Android Get Google Map Keylundi 21 janvier 13 19
  20. 20. Map and Geolocation Android App installlundi 21 janvier 13 20
  21. 21. Map and Geolocation Android Steps of implementation Marker // Add Marker List<Overlay> mapOverlays = mapView.getOverlays(); Drawable drawable = this.getResources().getDrawable(R.drawable.marker); HelloItemizedOverlay itemizedoverlay = new HelloItemizedOverlay(drawable, this); GeoPoint point = new GeoPoint(48856628,2370228); OverlayItem overlayitem = new OverlayItem(point, "Aimaf Formation Android", "Salut les amis! nous sommes ici :)"); itemizedoverlay.addOverlay(overlayitem); mapOverlays.add(itemizedoverlay); //Add controller and animate to GeoPoint MapController mc = mapView.getController(); MyLocationOverlay myLoc = new MyLocationOverlay(this, mapView); myLoc.enableCompass(); mapView.getOverlays().add(myLoc); mc.animateTo(point);lundi 21 janvier 13 21
  22. 22. Map and Geolocation Android ScreenShotlundi 21 janvier 13 22
  23. 23. Androidlundi 21 janvier 13 23
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×