I am using google map direction api and my api key is on billing mode.When I try to use this map API..It works only on one device(When I installed it for the first time).
I am unable to use it on any other device.My map becomes blank.
Free trial api's works fine!!
Please give the permissions with your manifest. First, in the following you need to replace the package name with your package.
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
per your package name, should be --
<permission
android:name="com.example.barcodelibrary.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.barcodelibrary.permission.MAPS_RECEIVE"/>
Finally, you seem to be missing the following permissions.
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
I hope it will work for you.
There are two possible
1.Please change your api key and check it.
2.Otherwise, you have to build an apk from which android studio id you give to get api key from android google map.
Related
I uploaded my react-native app on PlayStore and I saw that my app "may request permission" to access location.
I do not use location services on application so I want it removed. Is there anyway to find out where location services are potentially used? AndroidManifest.xml does not mention any location services. How do I remove this permission?
I want the "may request access to Location" be removed from the permissions in Play Store when it is uploaded.
Try adding this to your AndroidManifest:
<uses-permission tools:node=”remove” android:name=”EnterPermissionNameHere” />
the important part is the attribute tools:node=”remove”this way it will try to remove the permission if its added from somewhere within the app. Just Make sure to replace "EnterPermissionNameHere" with the exact permission name for example "android.permission.ACCESS_FINE_LOCATION"
Maybe this will fix your problem
adding this
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.blah.blah">
.......
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" tools:node="remove" />
reference : https://support.google.com/googleplay/android-developer/answer/9888170
May be some of third party used locations services which you integrated in your app.
you should remove like this
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"
tools:node="remove" />
Increase apk version and upload in play store .if its not accept then go to appeal for playstore team manually.
for more details Refer Here
While releasing the apk to play store, I found out that the my app requires the android.hardware.telephony feature but I haven't added it in manifest anywhere. I have also check the merged manifest in android studio and it also does not contain this feature so I think no third party sdk is adding this. What could be the source of this feature?
For reference, I have following permissions declared in the manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Also, when I make it optional using below code, the app is available on devices without this feature:
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
So why is required by default without adding it anywhere?
Google Play automatically adds some features, depending on which permissions you have requested.
As you have requested READ_SMS and RECEIVE_SMS permissions, this implies you use the telephony feature. So, Google Play reacts as if you had the following in your AndroidManifest.xml:
<uses-feature
android:name="android.hardware.telephony"
android:required="true" />
When you manually add this and declare it required="false", this tells Google Play that whilst you do ask for the permission, you can handle the case where the user does not have the telephony feature.
This is confirmed via this note in the docs:
Note: Some system permissions implicitly require the availability of a device feature. For example, if your app requests permission to access to BLUETOOTH, this implicitly requires the FEATURE_BLUETOOTH device feature.
The full list of permissions and the feature requirements implied is available here, and includes your situation:
Finally, with your ACCESS_COARSE_LOCATION you are also declaring a feature requirement on android.hardware.location, just for your information.
There's also further detailed information over on the GameDev StackExchange.
One or more of the dependencies / modules / libraries your project is using is adding that requirement to your Android Manifest.
To investigate open your main Android Manifest file in Android Studio, and click on the Merged Manifest tab at the bottom of the page.
This will show you a view of the final merged Manifest, along with sources of each line.
Read more about this here: https://developer.android.com/studio/build/manifest-merge#inspect_the_merged_manifest_and_find_conflicts
HOW TO FIX
If you wish to avoid adding that requirement to your final Manifest, you can use Node Markers in your Manifest to control how the merge works.
Read more about Node markers here: https://developer.android.com/studio/build/manifest-merge#node_markers
e.g. try this:
<uses-feature
android:name="android.hardware.telephony"
android:required="false"
tools:node="replace" />
I am working on a project which has google map configuration and view.
But i can't see google map on the activity. The map has been loaded but not showing the details. Please see the image give.
See there is Google logo in left bottom corner. but still not showing the map on screen.
Following is Menifest.xml
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="key------" />
<permission
android:name="com.roadyo.passenger.googlemapsv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.MAPS_RECIEVE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
Please check your api key.
Follow this link to generate api key for google maps
Google map console
Here is a simple example of how to use maps in our app, it gives step by step implementation of it, including registering app foe google APIs...
http://javapapers.com/android/android-show-current-location-on-map-using-google-maps-api/
Check your Sha1 and package name used to generate the api key. I have also got this error when i checked it its beacause of the mistake in package name and i regenerated the key by changing the package and i got it correctly
I cannot get Google Maps to work on my app.
I see a blank screen; no grids show, only the google logo and the +/- zoom buttons.
What I have done:
I have the "Google Maps Android API v2" API enabled
I have added my project along with the demo project to the API credential list on Google console
I've also added the required permissions for Internet, location, com.google.android.providers.gsf.permission.READ_GSERVICES.
Even added the "MAPS_RECEIVE" permission as some posts suggested
Also added the 'meta-data' google_play_services_version
Since the demos are working, I literally copied MultiMapDemoActivity and its files into my project and tried opening map, to no avail.
The problem may be linked to this issue. However, it seems like they can't get map to work at all.
Here is the interesting bit that I noticed, I usually get this:
10-02 12:29:20.376: D/REQUEST(5826): Connection opened to:https://clients4.google.com/glm/mmap/api
10-02 12:29:20.376: D/REQUEST(5826): Open Connection
Followed by this:
10-02 12:21:45.361: D/REQUEST(5826): DRD(80): 62|132
10-02 12:21:45.361: D/REQUEST(5826): Close
10-02 12:21:45.361: D/REQUEST(5826): Error processing: com.google.maps.api.android.lib6.b.d#42caa7b8 not retrying
10-02 12:21:45.361: D/REQUEST(5826): Retrying: com.google.maps.api.android.lib6.gmm6.c.a#4296a530
Also, not sure if this is relevant, but as soon as I click to open the map, or click on the map after it has opened and is showing a blank view, I see this:
10-02 13:03:32.978: E/DatabaseUtils(15468): Writing exception to parcel
10-02 13:03:32.978:/DatabaseUtils(15468): java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this
requires android.permission.INTERACT_ACROSS_USERS_FULL
EDIT #1
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
EDIT #2
Also, the declared package name was com.A.B.C (the manifest); whereas the activities of my project had the structure of com.A.B..
I have since updated my project structure to match that of the manifest, but I still see the same errors as before, nothing changes. I'm really at sea here, since I cannot understand what could be going wrong here.
Some help to resolve this will be appreciated, thanks!
It turns out that I had read n-1 questions regarding this issue here. Finally, after continuous searching everywhere, I stumbled upon the answer here by #Jack.
Basically the line:"HttpsURLConnection.setDefaultSSLSocketFactory(...)" was the culprit in my code. I commented it out and everything worked fine.
NOTE: I have not tried to keep the line of code and modify it to make maps work yet. If I need/do it, I'll post a comment.
You need to add your SHA1 fingerprint to the public API access.
Go to eclipse > preferences. Android > build and copy your default eclipse SHA1 fingerprint.
Now go to https://console.developers.google.com select your app, 'APIs and auth' > 'credentials' > and click on 'Edit allowed android applications' put your SHA1 figerfirnt like that:
XX:XX:XX:XX:XX...XX;com.your.pakage.app
What about your google key? This line in the Manifest file:
<meta-data android:name="com.google.android.maps.v2.API_KEY"
....
I am also struggling with such behavior constantly. The first thing you want to verify in such situations is that your key from debug.keystore file is indeed the one that you registered with Google. This key will be used when you are debugging your application locally.
Note, however, you will need another keystore file when you release your application. At the time of signing, you should create another keystore, and register it too with Google.
I had this problem too and it took me so much hours to resolve it, at last I've done these steps and it worked finally!
Do the same steps as it followed here https://developers.google.com/maps/documentation/android/start
Use the debug certificate fingerprint if you're testing your project instead of the release certificate which you use when you install your app in the play store.
Don't forget to add the value of the Google API and replace the "API_VALUE" with it.
Change your project build target into Google APIs: Project>properties>android>target.
Hope this helps..
These are the permissions you need according to Google documentation:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
I recommend you to include this too:
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
Add those in your manifest file
<permission
android:name="xxx.xxxx.xxxx.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="xxx.xxxx.xxxx.permission.MAPS_RECEIVE" />
<uses-permission android:name="xxx.xxxx.xxxx.permission.READ_GSERVICES" />
replace xxx.xxxx.xxxx with your package name
I have a problem while publishing on the Market. My application does not use autofocus feature but when I publish it on the market I see in console following:
android.hardware.camera
android.hardware.camera.autofocus
And here are permissions and features that I request in manifest file:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Can anyone tell me what's the problem please?
Are the proper <uses-feature> tags included in your manifest? That means only
<uses-feature android:name="android.hardware.camera" />
The doc states:
For example, if an application requests the CAMERA permission but does not declare a element for android.hardware.camera, Google Play considers that the application requires a camera and should not be shown to users whose devices do not offer a camera.
from filtering based on implicit features
You can check this list and see that the two features mentioned by you are assumed when you use the camera permission and don't state anything in your manifest. Add the above code snippet and it should get reduced to just the camera-feature.