In Android Studio, write a program that get an address as a text-filed from the
ID: 3749610 • Letter: I
Question
In Android Studio, write a program that get an address as a text-filed from the user in the first screen which also contains a button. When the button is clicked or touched, the app shows the map on the second screen with the detail map at the given address.
I have done the coding but my app keeps on closing when I try to open it.
//content_main.xml
//activity_maps.xml
//activity_main.xml
//google_maps_api.xml
//MainActivity.java
//MapsActivity.java
//build.gradle(Module:app)
//build.gradle(Project:map)
Explanation / Answer
Your app is crassing.It as two reasons
1) You have not included user permission in code which are required. In this case it requires location aceess and Map app access.
2) If you are inclded in code but not giving user permission while you run your program.
To add user pemission you need to add required permission in
***Replace this with permission.
In Eclipse we were able to add permissions in AndroidManifest.xml by going to AndroidManifest.xml->Permission-> Adding permissions.