How to get current location in Android Google Map (FusedLocationProviderApi)

In this tutorial , we will learn how to make a Google Maps App that shows your current location. Best to use the FusedLocationProviderApi now, as it offers less battery drain than the old open source LocationManager API. Also, if you’re already using Google Play Services for Google Maps, there’s no reason not to use it. I have added sample code in Github, you can download the code from here (Download Code).

YouTube Video:

 

NOTEYou have to provide your own API_KEY in google_maps_api.xml, otherwise location will not display in your application.

Creating new Android Project:

1) Open Android Studio and make a new project with name “Current Location”  and company domain app.test.currentlocation.saidur.me.currentlocation;

2) Click Next and choose android version Lollipop. Again Click Next and Choose Google Maps Activity.

3) Leave all things remaining same and Click Finish.

Now you will be able to see three files:

  • google_maps_api.xml (…/GoogleMapsApp/app/src/debug/res/values/google_maps_api.xml)
  • MapsActivity.java (…/GoogleMapsApp/app/src/main/java/com/androidtutorialpoint/googlemapsapp/MapsActivity.java)
  • AndroidManifest.xml ( …/GoogleMapsApp/app/src/main/AndroidManifest.xml)
Read More
 

The number of method references in a .dex file cannot exceed 64K (multidex issue)

As the Android platform has continued to grow, so has the size of Android apps. When your app and the libraries it references reach a certain size, you encounter build errors that indicate your app has reached a limit of the Android app build architecture. Earlier versions of the build system report this error as follows:

Conversion to Dalvik format failed:
Unable to execute dex: method ID not in [0, 0xffff]: 65536

More recent versions of the Android build system display a different error, which is an indication of the same problem:

trouble writing output:
Too many field references: 131000; max is 65536.
You may try using multi-dex option.

Read More

 

Android Application BD Holiday Calendar and IELTS Writing

 Application Name : IELTS Writing
https://play.google.com/store/apps/details?id=me.saidur.ieltswriting&hl=en
This application emphasizes on basic android application process along with material design. IELTS Writing is a helpful application those who want to study IELTS. That is enough for you to prepare for an IELTS writing test. This application is for academic IELTS test preparation. It will also help for general writing.

Read More