google maps api v2 Authentication error - google-maps-android-api-2

Like a lot of people, I'm going in circles. I had an app working fine with Google Maps API v2, and then, maybe through updating Eclipse, the maps stopped working. I have the grey tiles appear, but I get the error:
08-18 11:03:56.678: E/GooglePlayServicesUtil(7750): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
08-18 11:03:56.923: D/dalvikvm(7750): GC_CONCURRENT freed 1233K, 15% free 13248K/15495K, paused 2ms+3ms
08-18 11:03:56.968: D/OpenGLRenderer(7750): Flushing caches (mode 0)
08-18 11:03:59.223: D/dalvikvm(7750): GC_CONCURRENT freed 1302K, 14% free 13375K/15495K, paused 4ms+3ms
08-18 11:03:59.538: I/Google Maps Android API(7750): Failed to contact Google servers. Another attempt will be made when connectivity is established.
08-18 11:04:14.688: E/Google Maps Android API(7750): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
I've seen a lot of posts, and I thought I'd covered everything. My manifest reads:
<permission
android:name="com.xxx.xxx.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.xxx.xxx.permission.MAPS_RECEIVE"/>
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- External storage for caching. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- My Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyD8YSb-xzI1CN9EZvfukLvCtioryzDpyg4"/>
<uses-library android:name="com.google.android.maps"/>
My library set-up looks like this:
with the following build path:
Anyone got any ideas where I am going wrong? The API key is the one that worked last time.

If you are using the same API key, there are two reasons your key might stop working --
1) The package name of your app has changed. Did you change the package name? if so you need to add/update it in your "Allowed Android Apps" to your API key on the API Console
2) The signing key of your app has changed. You mentioned you updated eclipse. You also do not mention if you are using the debug key to sign the app, but is it possible you generated a new debug key for signing? You can check the debug certificate information by following the instructions in the maps docs. Then, check your API Console to make sure the fingerprint of your cert is listed correctly.

I've fixed it, and the problem was in having duplicate keys for the same app on the Google API console. I had created a debug and a release key, but in testing I was only listing the debug key in manifest. By deleting the app's listing from the release key, the maps started to work.
Strangely enough, I haven't had this problem with duplicate keys before. I also took the Google advice of listing both keys in Manifest, and that didn't work. What seems to work is only one live key in the API console, with only one reference in Manifest.

Related

My flutter app contains with some API calls. After building APK, it's says null value

I have made an app that fetches some data by API.
In my emulator, the app fetches data perfectly and shows the data correctly too.
But whenever I build an APK and install it on my phone the data doesn't show up.
Why is it happening? In the emulator, it's works.
For fetching data, I used future builder
Add:
<uses-permission android:name="android.permission.INTERNET" />
your AndroidManifest.xml
As flutter docs say on reviewing the app manifest you should locate your AndroidManifest.xml file located in [project]/android/app/src/main.
Then inside manifest tag insert Android permission element as
<uses-permission android:name="android.permission.INTERNET"/>
The code above follows the syntax mentioned here.
According to flutter docs:
The standard template does not include this tag but allows Internet access during development to enable communication between Flutter tools and a running app.

Flutter Crypto App working with full functionality on Emulator & physical device but after rolling out to app store many functionalities are missing

I have built a Crypto App with API from https://api.coingecko.com/api/...
This App works fine when on Emulator or Physical Device but after it is rolled out for production in Play Store, many functionalities are missing from the App (the whole API).
Play Store link : com.codoweb.cryptorealtime
Here are some snapshots for your better understanding -
What do I do ? Please help.
I belive you missed to add internet permission in the manifest
<manifest xlmns:android...>
...
<uses-permission android:name="android.permission.INTERNET" />
<application ...
</manifest>

API data no displayed in release mode but working in debug mode flutter

My API GET request gives me List of images and text which is displayed in debug mode emulator and real device too with data cable but when I build apk and install it I do not get the data. Also my app is already in play store and this is new feature I am working on. Anyone could help me with that? I am using path_provider and path packages too.
You have to provide internet permission inside android manifest file as right now you have in debug mode.
Mainfest file path : <project>/android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />

Flutter app working when building release-APK but not when provided via Google Play Store

We have an app connected to the internet.
Building a release APK is working and the app is connected to the internet.
Building a App Bundle, uploading it in the Google Play store and
installing it via Google Play the app is running but gets no connection to the internet.
downloading the apk via the App Bundle Explorer in the Google Play Console the app is running but gets no connection to the internet.
I also see the android.permission.INTERNET is set...
What can be the problem in my case?
<application android:label="APP_NAME" android:usesCleartextTraffic="true" //Add This>
</application>
<uses-permission android:name="android.permission.INTERNET"/> //Add This
Few Options I can think of:-
1. Build the apk from aab you uploaded on play. (test its behaviour)
2. Check that the flavor you are building, it doesn’t override settings, by having its own manifest.
3. Test on different devices.
4. See if there are any certificates installed.
5. Reverse Engineering (Last Option)
I found out the problem is not about the connection to the internet itself - the problem seems to be inside the flutter_secure_storage - but only when deployed in Google Play Store...
After updating flutter_secure_storage to the latest version the problem was gone.
10/2022
Hi guys, I faced with this error and the real problem came from flutter_secure_storage and shared_preferences. You guys need to add:
android:allowBackup="false" android:fullBackupContent="false"
to Androidmanifest.xml like this issues!
There is a manifest file in this directory
android/app/src/debug/AndroidManifest.xml
Copy the internet permission from above directory and to add the internet permission in this directory
android/app/src/main/AndroidManifest.xml

Flutter app doesn't have internet permission in APK file

My APK build file in flutter doesn't have internet permission.
I already did this
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.Supplier_app">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
This is a very general issue faced by flutter beginners.
In android, each required permission is specified in AndroidManifest.xml file.
For native coding there is only one file inside app/src/main. For flutter, there are not one but 3 of these.
app/src/debug/AndroidManifest.xml - for debug mode
app/src/main/AndroidManifest.xml- for app distribution in release mode
app/src/profile/AndroidManifest.xml - for running app in profile mode
The internet permission is provided by default in the debug mode. So, internet works without doing anything.
All the permissions required for app distribution must be specified in app/src/main/AndroidManifest.xml. For testing purpose, the permissions are specified in other files mentioned.
Please check the mode of the app in which you have permission. It should be in main/AndroidManifest.
You are probably trying to edit the AndroidManifest.xml that is located inside the "debug" directory. The AndroidManifest.xml you are looking for is located in the app\src\main path.