I am developing an Android Application and was looking into Google Places for some functionality within the application. Google has recently released the PlacePicker feature which is what I am using. I have followed the Google guidelines and quick start guides to the "T". The functionality was working amazing as of three hours ago and now when I go to test it, it launches and then immediately closes with no errors thrown in the stack trace. Here is how I am using the code:
This is within a fragment.
// The Location Selection from Google Place Picker
where.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
try {
launchPlace();
} catch (GooglePlayServicesNotAvailableException | GooglePlayServicesRepairableException e) {
e.printStackTrace();
}
}
});
This is within the fragments onCreateView.
The method launchPlace() is defined as follows.
// Start Google Place Picker Code **************************************************************
public void launchPlace() throws GooglePlayServicesNotAvailableException,
GooglePlayServicesRepairableException {
PLACE_PICKER_REQUEST = 1;
PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
Context context = getActivity().getApplicationContext();
startActivityForResult(builder.build(context), PLACE_PICKER_REQUEST);
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
String badLocation = "That location is not valid for this app, please select a valid location";
if (requestCode == PLACE_PICKER_REQUEST) {
if (resultCode == Activity.RESULT_OK) {
place = PlacePicker.getPlace(data, getActivity().getApplicationContext());
if (place.getPlaceTypes().contains(34)) {
if (place.getPlaceTypes().contains(9) || place.getPlaceTypes().contains(15) ||
place.getPlaceTypes().contains(38) ||
place.getPlaceTypes().contains(67) ||
place.getPlaceTypes().contains(79)) {
where.setText(place.getName());
loc = true;
} else {
Toast.makeText(getActivity().getApplicationContext(),
badLocation, Toast.LENGTH_LONG).show();
try {
launchPlace();
} catch (GooglePlayServicesNotAvailableException | GooglePlayServicesRepairableException e) {
e.printStackTrace();
}
}
}
}
}
}
This code worked previously (3 hours ago) and now does not. Here is what LogCat says: (Android Studio)
04-21 15:48:02.320 5045-5045/com.siliconmindtech.trofi D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
04-21 15:48:02.680 5045-5124/com.siliconmindtech.trofi D/OpenGLRenderer﹕ endAllStagingAnimators on 0xa1a55600 (InsetDrawable) with handle 0xa185dff0
04-21 15:48:05.000 5045-5121/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
04-21 15:48:05.060 5045-5045/com.siliconmindtech.trofi I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#215c768a time:9757022
If anyone knows of a way to help with this that would be amazing, I know that Google PlacePicker is quite new but I am a novice Android Developer and feel like someone has a better understanding than I. Any and all help would be appreciated. If more information is required please let me know. We use GitHub so I have reverted all the way back to when it once worked, yet nothing changed, it still closes (the picker, not the app). I have enabled the Google Places API and Google Places API for Android in the developer console, no help there either. It gets to the "Updating your location" screen then stops.
EDIT: This is the entire LogCat, from launch (On a Samsung Galaxy S5) to the PlacePicker starting (One navigation prior to that action) then closing and returning to the app. Is this what you meant?
04-21 16:56:26.740 27318-27318/com.siliconmindtech.trofi D/ResourcesManager﹕ creating new AssetManager and set to /data/app/com.siliconmindtech.trofi-1/base.apk
04-21 16:56:26.910 27318-27318/com.siliconmindtech.trofi D/AbsListView﹕ Get MotionRecognitionManager
04-21 16:56:26.910 27318-27340/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
04-21 16:56:26.910 27318-27340/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Static: isShipBuild true
04-21 16:56:26.910 27318-27340/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Thread-13137-1066627414: SmartBonding Enabling is false, SHIP_BUILD is true, log to file is false, DBG is false
04-21 16:56:26.910 27318-27340/com.siliconmindtech.trofi I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
04-21 16:56:26.910 27318-27318/com.siliconmindtech.trofi D/AbsListView﹕ Get MotionRecognitionManager
04-21 16:56:26.940 27318-27318/com.siliconmindtech.trofi D/Activity﹕ performCreate Call secproduct feature valuefalse
04-21 16:56:26.940 27318-27318/com.siliconmindtech.trofi D/Activity﹕ performCreate Call debug elastic valuetrue
04-21 16:56:26.950 27318-27318/com.siliconmindtech.trofi D/AbsListView﹕ Get MotionRecognitionManager
04-21 16:56:26.970 27318-27350/com.siliconmindtech.trofi D/OpenGLRenderer﹕ Render dirty regions requested: true
04-21 16:56:27.030 27318-27350/com.siliconmindtech.trofi I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: ()
OpenGL ES Shader Compiler Version: E031.25.01.03
Build Date: 10/28/14 Tue
Local Branch: LA.BF.1.1_RB1_20141028_021_patches2
Remote Branch:
Local Patches:
Reconstruct Branch:
04-21 16:56:27.030 27318-27350/com.siliconmindtech.trofi I/OpenGLRenderer﹕ Initialized EGL, version 1.4
04-21 16:56:27.050 27318-27350/com.siliconmindtech.trofi I/OpenGLRenderer﹕ HWUI protection enabled for context , &this =0xa23090d8 ,&mEglDisplay = 1 , &mEglConfig = 8
04-21 16:56:27.050 27318-27350/com.siliconmindtech.trofi D/OpenGLRenderer﹕ Enabling debug mode 0
04-21 16:56:27.050 27318-27340/com.siliconmindtech.trofi I/System.out﹕ KnoxVpnUidStorageknoxVpnSupported API value returned is false
04-21 16:56:27.240 27318-27350/com.siliconmindtech.trofi V/RenderScript﹕ Application requested CPU execution
04-21 16:56:27.260 27318-27350/com.siliconmindtech.trofi V/RenderScript﹕ 0xa2377a00 Launching thread(s), CPUs 4
04-21 16:56:27.310 27318-27318/com.siliconmindtech.trofi I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#344b9848 time:13859270
04-21 16:56:29.700 27318-27318/com.siliconmindtech.trofi D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
04-21 16:56:31.850 27318-27318/com.siliconmindtech.trofi D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
04-21 16:56:31.970 27318-27318/com.siliconmindtech.trofi I/Places﹕ Got here!
04-21 16:56:32.300 27318-27350/com.siliconmindtech.trofi D/OpenGLRenderer﹕ endAllStagingAnimators on 0xa196d600 (InsetDrawable) with handle 0xaf7fc350
04-21 16:56:32.740 27318-27318/com.siliconmindtech.trofi I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#344b9848 time:13864703
The above LogCat is Verbose.
Solution: Don't be a newbie like me, I had forgotten to add my Google API Key to my android_manifest.xml... I apologize.
Just enable Google Places API for Android in your Google Developer Console.
Don't forget to specify your API key at AndroidManifest:
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="ADD_YOUR_API_KEY_HERE" />
I believe that when Google made changes to their API's on 04/20/2015 they modified the places API that the PlacePicker inherently uses. The solution that worked for me is as follows:
Go to your Google Developer Console (https://console.developers.google.com/project)
Navigate to your project if you have made one. If not go here: https://developers.google.com/console/help/
Navigate to "APIs & auth" then to "Credentials" on the left side of the console. I don't have enough rep to post a picture for guidance...
Create a new Key, this appears under Public API access in your Credentials window. You will need your SHA1 Fingerprint to receive the key. Directions that I used are here: How to get the SHA-1 fingerprint certificate in Android Studio for debug mode?
The location that you input your SHA1 Fingerprint should be in this format:
(Your Key, 20 Hex values separated by ":");com.yourpackage.yourapp
Copy your API Key that is generated. You will need to add the fingerprint of each developer in the same format above for it to work for other developers.
Add your key to your AndroidManifest.xml
<application ...
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_api_key" />
... </application>
Where the "#string/google_api_key" /> is the key that you just generated. Place it in your strings.xml file as such:
<string name="google_api_key">yourkeyhere</string>
Clean and Rebuild your project. Should be working now. I don't think I left any steps out... Please comment if I have.
I have the same issue. I add Google map key
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key"/>` in manifest file.
The Place Picker closes immediately. Then, i also add
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_api_key" />
The Place Picker shows, but when i open map, my app was force close, and log like below.
RuntimeException: The API key can only be specified once. It is recommended that you use the meta-data tag with the name: com.google.android.maps.v2.API_KEY in the <application> element of AndroidManifest.xml
at com.google.maps.api.android.lib6.d.fb.a(Unknown Source)
at com.google.maps.api.android.lib6.a.g.a(Unknown Source)
at com.google.android.gms.maps.internal.CreatorImpl.b(Unknown Source)
at com.google.android.gms.maps.internal.CreatorImpl.b(Unknown Source)
at com.google.android.gms.maps.internal.i.onTransact(SourceFile:62)
at android.os.Binder.transact(Binder.java:364)
at com.google.android.gms.maps.internal.zzc$zza$zza.zzj(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zzb.zzqs(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zzb.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.onCreate(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreate(Unknown Source)
at android.support.v4.app.Fragment.performCreate(Fragment.java:1763)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:915)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1136)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1499)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:456)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)
I try to remove
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key"/>`
but keep
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_api_key" />
And It's working well, now, and I don't know why.
replace your meta data tag in the mainfeast .. it works for me ..
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="YOUR ANDROID KEY" />
with
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR ANDROID KEY" />
good luck
I had the same problems using the Places API. At the end, I figured out that there are different Google Places APIs especially for Android. Consequently, the API-Key that I was using was simply for the non-Android version.
Generate your key using this link:
https://developers.google.com/places/android-api/signup
in my case GO to Google COnsole then Enabled API for Android Google Places, then Go to Manifest.xml and put this code under
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
and dont forget to put Google API key
How i fixed this error was when getting an API key (On Google Developers Page) , the location where you enter your package name enter your complete package name. This is available in your android manifest!
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 days ago.
Improve this question
I'm getting some runtime errors when trying to connect to the Appstore SDK in sandbox mode from a Samsung Device:
D/Kiwi: CommandServiceClient: Binding Service!!!
D/Kiwi: CommandServiceClient: Created intent with action com.amazon.venezia.CommandService
E/Kiwi: CommandServiceClient: CommandServiceException happened, retriesLeft=4
com.amazon.a.a.n.a.a.c: COMMAND_SERVICE_NOT_INSTALLED: null: null
at com.amazon.a.a.n.a.d.e(CommandServiceClient.java:257)
at com.amazon.a.a.n.a.d.a(CommandServiceClient.java:181)
at com.amazon.a.a.n.a.a.a(AbstractCommandTask.java:124)
at com.amazon.a.a.n.b.b$1.run(SimpleTaskPipeline.java:179)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.os.HandlerThread.run(HandlerThread.java:67)
D/Kiwi: CommandServiceClient: Sleeping for 400 ms
I/ViewRootImpl#4ec0c94[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView#f7f1bd[MainActivity]
D/InputMethodManager: getNavigationBarColor() -855310
D/FA: Connected to remote service
D/InputMethodManager: prepareNavigationBarInfo() DecorView#f7f1bd[MainActivity]
D/InputMethodManager: getNavigationBarColor() -855310
mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
V/FA: Processing queued up service tasks: 7
D/InputTransport: Input channel constructed: 'ClientS', fd=202
D/InputMethodManager: prepareNavigationBarInfo() DecorView#f7f1bd[MainActivity]
D/InputMethodManager: getNavigationBarColor() -855310
mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager: startInputInner - Id : 0
I/SurfaceControl: nativeRelease nativeObject s[-5476376664434943808]
I/SurfaceControl: nativeRelease nativeObject e[-5476376664434943808]
I/SurfaceControl: nativeRelease nativeObject s[-5476376664434943904]
I/SurfaceControl: nativeRelease nativeObject e[-5476376664434943904]
W/FlurryAgent: Analytics report sent to https://data.flurry.com/v1/flr.do
I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
I/Ads: Ad failed to load : 3
D/MyAds: No ad config.
I/Ads: Ad failed to load : 3
AllocSpace objects, 2(104KB) LOS objects, 49% free, 7073KB/13MB, paused 212us total 103.640ms
D/FONTSIZE: letter=50specials:36
D/TAG: tileWidth=72.0
I/TAG: No ad config.
I/Ads: Ad failed to load : 3
D/Kiwi: CommandServiceClient: Binding Service!!!
D/Kiwi: CommandServiceClient: Created intent with action com.amazon.venezia.CommandService
E/Kiwi: CommandServiceClient: CommandServiceException happened, retriesLeft=3
com.amazon.a.a.n.a.a.c: COMMAND_SERVICE_NOT_INSTALLED: null: null
at com.amazon.a.a.n.a.d.e(CommandServiceClient.java:257)
at com.amazon.a.a.n.a.d.a(CommandServiceClient.java:181)
at com.amazon.a.a.n.a.a.a(AbstractCommandTask.java:124)
at com.amazon.a.a.n.b.b$1.run(SimpleTaskPipeline.java:179)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.os.HandlerThread.run(HandlerThread.java:67)
D/Kiwi: CommandServiceClient: Sleeping for 800 ms
W/FlurryAgent: Analytics report sent to https://data.flurry.com/v1/flr.do
D/Kiwi: CommandServiceClient: Binding Service!!!
D/Kiwi: CommandServiceClient: Created intent with action com.amazon.venezia.CommandService
E/Kiwi: CommandServiceClient: CommandServiceException happened, retriesLeft=2
com.amazon.a.a.n.a.a.c: COMMAND_SERVICE_NOT_INSTALLED: null: null
at com.amazon.a.a.n.a.d.e(CommandServiceClient.java:257)
at com.amazon.a.a.n.a.d.a(CommandServiceClient.java:181)
at com.amazon.a.a.n.a.a.a(AbstractCommandTask.java:124)
at com.amazon.a.a.n.b.b$1.run(SimpleTaskPipeline.java:179)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.os.HandlerThread.run(HandlerThread.java:67)
D/Kiwi: CommandServiceClient: Sleeping for 1600 ms
D/Kiwi: CommandServiceClient: Binding Service!!!
D/Kiwi: CommandServiceClient: Created intent with action com.amazon.venezia.CommandService
E/Kiwi: CommandServiceClient: CommandServiceException happened, retriesLeft=1
com.amazon.a.a.n.a.a.c: COMMAND_SERVICE_NOT_INSTALLED: null: null
at com.amazon.a.a.n.a.d.e(CommandServiceClient.java:257)
at com.amazon.a.a.n.a.d.a(CommandServiceClient.java:181)
at com.amazon.a.a.n.a.a.a(AbstractCommandTask.java:124)
at com.amazon.a.a.n.b.b$1.run(SimpleTaskPipeline.java:179)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.os.HandlerThread.run(HandlerThread.java:67)
D/Kiwi: CommandServiceClient: Sleeping for 3200 ms
V/FA: Inactivity, disconnecting from the service
D/Kiwi: CommandServiceClient: Binding Service!!!
D/Kiwi: CommandServiceClient: Created intent with action com.amazon.venezia.CommandService
When trying to get the user data but the request never returns on Sandbox.
D/d: Appstore SDK - Sandbox Mode: sendGetUserDataRequest
D/d: Appstore SDK - Sandbox Mode: sendPurchaseUpdatesRequest/sendGetUserData first:a3c3a5b3-d45d-4a0d-9ba7-6bb7c3075bba
D/d: Appstore SDK - Sandbox Mode: sendItemDataRequest
When running against the production servers I get a "FAILED" status when trying to get IAP product information available like price name etc.
I have their Amazon App Tester app installed and it recognizes the local json I've uploaded.
Does it look like a broken linking maybe or Pro guard invalid config file ? I'm a beginner on Android development , was able to implement Play Store IAP's sucessufully in the past but seems I'm missing something regarding the Amazon Store IAP.
Since API 30 you need to add queries to the manifest file. For Amazon this is needed:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
...>
<queries>
<package android:name="com.amazon.venezia"/>
</queries>
It's really weird that they didn't write that in their documentation.
Thanks a lot, Simon ! I've included the queries part like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mycompany.myapp">
<queries>
<package android:name="com.amazon.venezia"/>
</queries>
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
But I still get the command service not installed error:
> D/Kiwi: AbstractCommandTask: ----------------------------------------------
D/Kiwi: AbstractCommandTask: Executing: get_license
D/Kiwi: AbstractCommandTask: ----------------------------------------------
D/Kiwi: AbstractCommandTask: Executing Command: get_license
D/Kiwi: CommandServiceClient: Binding Service!!!
D/Kiwi: CommandServiceClient: Created intent with action com.amazon.venezia.CommandService
E/Kiwi: CommandServiceClient: CommandServiceException happened, retriesLeft=6
com.amazon.a.a.n.a.a.c: COMMAND_SERVICE_NOT_INSTALLED: null: null
at com.amazon.a.a.n.a.d.e(CommandServiceClient.java:257)
at com.amazon.a.a.n.a.d.a(CommandServiceClient.java:181)
at com.amazon.a.a.n.a.a.a(AbstractCommandTask.java:124)
at com.amazon.a.a.n.b.b$1.run(SimpleTaskPipeline.java:179)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
When running agains Production. When using Sandbox mode, I don't get anymore COMMAND_SERVICE_NOT_INSTALLED but I do get AUTH_TOKEN_VERIFICATION_FAILURE:
> D/Kiwi: AbstractCommandTask: Exception occurred while processing task: com.amazon.a.a.n.a.a.a: AUTH_TOKEN_VERIFICATION_FAILURE: null: null
com.amazon.a.a.n.a.a.a: AUTH_TOKEN_VERIFICATION_FAILURE: null: null
at com.amazon.a.a.n.a.b.a(AuthenticationTokenVerifier.java:94)
at com.amazon.a.a.n.a.a.a(AbstractCommandTask.java:204)
at com.amazon.a.a.n.a.a.a(AbstractCommandTask.java:131)
at com.amazon.a.a.n.b.b$1.run(SimpleTaskPipeline.java:179)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.os.HandlerThread.run(HandlerThread.java:67)
E/Kiwi: AbstractCommandTask: On Exception!!!!: com.amazon.a.a.n.a.a.a: AUTH_TOKEN_VERIFICATION_FAILURE: null: null
I've included the .pem file as they suggested in the project's assets directory but it seems it didn't work:
AppstoreAuthenticationKey.pem
Do you have any clue of what might be the issue ?
Check you have the Amazon App Tester app installed and configured with your IAP json data, along with the correct receiver tags in your merged AndroidManifest. Additionally, make sure you have sandbox mode enabled on your test device(s):
https://stackoverflow.com/a/71393893/18483253
See also my answer over here:
https://stackoverflow.com/a/71588959/18483253
Thanks #Chris for your answer! I had the same problem, regrettably it took me a while to understand some connections behind the testing process, so I'd like to summarise a few things that I found out.
Apart from the actual coding, a common mistake seems to be the missing receiver in the Manifest. If you encounter the issue, doublecheck here:
https://developer.amazon.com/docs/in-app-purchasing/iap-implement-iap.html#responsereceiver
Make sure you have downloaded the PEM-file and put it in the right directory. Doublecheck here:
https://developer.amazon.com/docs/in-app-purchasing/integrate-appstore-sdk.html#configure_key
Now the misunderstanding that I had: When testing in-app purchases with Google Play, the device is actually loading the products from the server. But here's a major difference for Amazon: When testing with the Amazon App Store in Debug mode, the test-device will NOT connect to the server, but the request is handled by another test app, the Amazon App Tester:
https://www.amazon.com/-/de/gp/mas/get/android/ref=mas_buy_client?showAsin=1&asin=B00BN3YZM2
But it is not enough to have the app installed on the test device, you also need to download the sku-definition from the web-interface and push it to the test-device. When you then open the Amazon App Tester app, you can see your sku(s) in the last section. Only if you see them there, your test requests will be handled by the app!
Here's the tutorial video with the specific steps to set up the device:
https://www.youtube.com/watch?v=cmPAY16wGb0&list=PL93Q4ZD_4z4oUkRM0ap23LAN3HBENuXt2&index=9&t=289s
I hope this also helps for your understanding!
I'm attempting to get my PWA app working using the Google TWA guide here:
https://developers.google.com/web/updates/2019/02/using-twa
I've followed the guide completely from start to finish multiple times, but can't seem to get it to hide the URL bar at any point.
I have uploaded the apk(release) to Google Play Console, and allowed it to do the signing for me.
I've gone through basically all of the questions on SO, and none of the solutions seem to work for me, or I already have them set up correctly.
Things to note that I have tried and checked:
I've copied the SHA256 fingerprint to my assetlinks.json file that was provided to me by the Play Console. Didn't work.
I've used the manually generated SHA256 fingerprint that I set up in Android Studio in my assetlinks.json. Didn't work.
Under both of the above conditions, I have tried manually loading the generated apk onto my phone instead of the apk from the Play Console. Didn't work.
I've tried using Android Studio to install the app using developer mode with USB debugging on my phone (tried both release and debug flavours). Also didn't work.
Tried changing the namespace in the strings.xml to "android_app" to match the namespace in the assetlinks.json file as a bit of a long shot. Didn't work.
Confirmed that the assetlinks.json file works using the asset links generator: https://developers.google.com/digital-asset-links/tools/generator
My assetlinks.json path is /.well-known/assetlinks.json
My intents seem to work (clicking a link in Google search results will prompt to launch the app, and the association stays)
My build.gradle (Module)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.mypwadomain.www"
minSdkVersion 16
targetSdkVersion 29
versionCode 3
versionName "0.1.9"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.github.GoogleChrome.custom-tabs-client:customtabs:d08e93fce3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
My AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mypwadomain.www">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="PWAAppName"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<meta-data
android:name="asset_statements"
android:resource="#string/asset_statements" />
<activity
android:name="android.support.customtabs.trusted.LauncherActivity">
<meta-data
android:name="android.support.customtabs.trusted.DEFAULT_URL"
android:value="https://www.mypwadomain.com/login" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:scheme="https"
android:host="www.mypwadomain.com"/>
</intent-filter>
</activity>
</application>
</manifest>
My strings.xml
<resources>
<string name="app_name">PWAAppName</string>
<string name="asset_statements">
[{
\"relation\": [\"delegate_permission/common.handle_all_urls\"],
\"target\": {
\"namespace\": \"web\",
\"site\": \"https://www.mypwadomain.com\"}
}]
</string>
</resources>
My assetlinks.json
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "web",
"site": "https://www.mypwadomain.com"
}
},{
"relation": ["delegate_permission/common.handle_all_urls"],
"target" : { "namespace": "android_app", "package_name": "com.mypwadomain.www",
"sha256_cert_fingerprints": ["...Google Signed Fingerprint..."] }
}]
The Audit in Lighthouse for the app itself comes back as 100 PWA compatibility, and adding to homescreen works well on both Android and iOS devices.
I'm pretty new to this. I'm primarily a PHP developer, and the actual app is working fine. I literally installed Android Studio for the first time a few days ago. On the plus side, I use PHPStorm, which is also made by JetBrains, so that part helped with the learning curve.
Any help or advice on what else I can check would be greatly appreciated.
EDIT:
I loaded logcat via android studio (I am working on Windows). I then ran the app in debug mode, and the resulting log is below. No instances of OriginVerifier or digital_asset_links
2019-06-20 11:18:12.440 12042-12042/? E/Zygote: accessInfo : 1
2019-06-20 11:18:12.444 12042-12042/? I/SELinux: SELinux: seapp_context_lookup: seinfo=default, level=s0:c94,c257,c512,c768, pkgname=com.mypwaapp.www
2019-06-20 11:18:12.453 12042-12042/? I/m.mypwaapp.ww: Late-enabling -Xcheck:jni
2019-06-20 11:18:12.609 12042-12042/com.mypwaapp.www W/ActivityThread: Application com.mypwaapp.www is waiting for the debugger on port 8100...
2019-06-20 11:18:12.610 12042-12042/com.mypwaapp.www I/System.out: Sending WAIT chunk
2019-06-20 11:18:13.814 12042-12042/com.mypwaapp.www I/System.out: Debugger has connected
2019-06-20 11:18:13.815 12042-12042/com.mypwaapp.www I/System.out: waiting for debugger to settle...
2019-06-20 11:18:14.017 12042-12042/com.mypwaapp.www I/chatty: uid=10350(com.mypwaapp.www) identical 1 line
2019-06-20 11:18:14.220 12042-12042/com.mypwaapp.www I/System.out: waiting for debugger to settle...
2019-06-20 11:18:14.423 12042-12042/com.mypwaapp.www I/System.out: waiting for debugger to settle...
2019-06-20 11:18:14.625 12042-12042/com.mypwaapp.www I/System.out: waiting for debugger to settle...
2019-06-20 11:18:14.828 12042-12042/com.mypwaapp.www I/System.out: waiting for debugger to settle...
2019-06-20 11:18:15.032 12042-12042/com.mypwaapp.www I/chatty: uid=10350(com.mypwaapp.www) identical 1 line
2019-06-20 11:18:15.235 12042-12042/com.mypwaapp.www I/System.out: waiting for debugger to settle...
2019-06-20 11:18:15.440 12042-12042/com.mypwaapp.www I/System.out: debugger has settled (1500)
2019-06-20 11:18:15.457 12042-12042/com.mypwaapp.www D/ConnectivityManager_URSP: Ursp sIsUrsp=false, sIsCheckUrsp=false, uid=10350
2019-06-20 11:18:15.478 12042-12042/com.mypwaapp.www D/Proxy: urspP is null: 10350
2019-06-20 11:18:15.788 12042-12042/com.mypwaapp.www W/m.mypwaapp.ww: JIT profile information will not be recorded: profile file does not exits.
2019-06-20 11:18:15.831 12042-12042/com.mypwaapp.www I/chatty: uid=10350(com.mypwaapp.www) identical 10 lines
2019-06-20 11:18:15.835 12042-12042/com.mypwaapp.www W/m.mypwaapp.ww: JIT profile information will not be recorded: profile file does not exits.
2019-06-20 11:18:15.948 12042-12042/com.mypwaapp.www I/InstantRun: starting instant run server: is main process
2019-06-20 11:18:16.101 12042-12063/com.mypwaapp.www D/libEGL: loaded /vendor/lib64/egl/libGLES_mali.so
2019-06-20 11:18:16.403 12042-12042/com.mypwaapp.www D/TWAProviderPicker: Found Custom Tabs provider: com.sec.android.app.sbrowser
2019-06-20 11:18:16.404 12042-12042/com.mypwaapp.www D/TWAProviderPicker: Found no TWA providers, using first Custom Tabs provider: com.sec.android.app.sbrowser
2019-06-20 11:18:16.410 12042-12042/com.mypwaapp.www D/TWALauncherActivity: Using URL from Manifest (https://www.mypwaapp.com/login).
2019-06-20 11:18:17.330 12042-12042/com.mypwaapp.www W/m.mypwaapp.ww: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
2019-06-20 11:18:17.335 12042-12042/com.mypwaapp.www W/m.mypwaapp.ww: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
2019-06-20 11:18:17.506 12042-12042/com.mypwaapp.www D/OpenGLRenderer: Skia GL Pipeline
2019-06-20 11:18:17.528 12042-12042/com.mypwaapp.www D/EmergencyMode: [EmergencyManager] android createPackageContext successful
2019-06-20 11:18:17.678 12042-12042/com.mypwaapp.www D/InputTransport: Input channel constructed: fd=81
2019-06-20 11:18:17.686 12042-12042/com.mypwaapp.www D/ViewRootImpl#c9324c2[LauncherActivity]: setView = DecorView#fe5f2d3[LauncherActivity] TM=true MM=false
2019-06-20 11:18:17.717 12042-12042/com.mypwaapp.www D/ViewRootImpl#c9324c2[LauncherActivity]: Surface release. android.view.WindowManagerGlobal.setStoppedState:669 android.app.Activity.performStop:7646 android.app.ActivityThread.callActivityOnStop:4352 android.app.ActivityThread.performStopActivityInner:4330 android.app.ActivityThread.handleStopActivity:4405 android.app.servertransaction.StopActivityItem.execute:41 android.app.servertransaction.TransactionExecutor.executeLifecycleState:145 android.app.servertransaction.TransactionExecutor.execute:70
2019-06-20 11:18:17.779 12042-12042/com.mypwaapp.www D/ViewRootImpl#c9324c2[LauncherActivity]: dispatchAttachedToWindow
2019-06-20 11:18:17.839 12042-12042/com.mypwaapp.www D/ViewRootImpl#c9324c2[LauncherActivity]: Relayout returned: old=[0,0][1440,2960] new=[0,0][1440,2960] result=0x1 surface={valid=false 0} changed=false
EDIT 2:
I did find this in the logcat feed:
2019-06-20 12:23:56.772 6226-11769/? I/SingleHostAsyncVerifier: Verification result: checking for a statement with source a: # bpti#709f0232
w: 29
, relation delegate_permission/common.handle_all_urls, and target b <
a: "com.mypwaapp.www"
b: # bptg#e7d522a2
w: 118
>
w: 120
--> false.
Not sure if relevant or not.
My default browser must have reset to the Samsung browser when I cleared out settings on my phone (Samsung Note 9) when I was troubleshooting the problem. I set the default browser to Chrome. It's working fine.
Thanks to andreban :)
I had a similar case to #Incredibad, where I had both Chrome and Chrome Dev installed, with Chrome dev becoming the default browser.
I am developing game using cocos2d-x I am succesfully playing it on iOS, MacOS and win32 but at the moment I am having issue trying to launch it on android. Compilation and installation are completed I just can't launch it because of the problem I can't understand/see. Could someone help or hint me about the problem?
Info: testing on real device, Android version 4.4.4., cocos2d-x-3.13.1, c++, target 4.4.2, eclipse Neon.1a Release (4.6.1), mac os.
If additional information is required I can provide it.
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.companyName.gameName"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="19"/>
<uses-feature android:glEsVersion="0x00020000" />
<application android:label="#string/app_name"
android:icon="#drawable/icon">
<!-- Tell Cocos2dxActivity the name of our .so -->
<meta-data android:name="android.app.lib_name"
android:value="MyGame" />
<activity android:name="org.cocos2dx.cpp.AppActivity"
android:label="#string/app_name"
android:screenOrientation="landscape"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<supports-screens android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature"/>
LogCat (warn, error, assert):
04-21 09:49:49.917: E/Watchdog(596): !#Sync 1245
04-21 09:49:52.780: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143810266 , called by : com.google.android.gms, intent:Intent { cmp=com.google.android.gms/.lockbox.LockboxAlarmReceiver }
04-21 09:49:59.997: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143817481 , called by : android, intent:Intent { act=android.intent.action.TIME_TICK flg=0x50000000 }
04-21 09:50:00.157: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:50:00.157: E/accuweather(2304): [AccuTab_Magagine]>>> UIMK:1463 [0:0] time : 08:50
04-21 09:50:00.177: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:50:19.917: E/Watchdog(596): !#Sync 1246
04-21 09:50:36.803: W/ContextImpl(25935): Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:1255 android.content.ContextWrapper.startActivity:330 android.content.ContextWrapper.startActivity:330 com.samsung.android.MtpApplication.MtpReceiver$3.handleMessage:786 android.os.Handler.dispatchMessage:102
04-21 09:50:36.813: W/ContextImpl(25935): Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:1267 android.app.ContextImpl.startActivity:1256 android.content.ContextWrapper.startActivity:330 android.content.ContextWrapper.startActivity:330 com.samsung.android.MtpApplication.MtpReceiver$3.handleMessage:786
04-21 09:50:37.033: W/ActivityManager(596): mDVFSHelper.acquire()
04-21 09:50:37.043: E/MTPRx(25935): started activity for popup
04-21 09:50:37.154: W/ApplicationPackageManager(25935): getCSCPackageItemText()
04-21 09:50:37.204: E/SettingsReceiverActivity(25935): PREF_DONT_ASK_AGAIN : true
04-21 09:50:37.214: W/InputMethodManagerService(596): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#42ef9528 attribute=null, token = android.os.BinderProxy#42a655d8
04-21 09:50:38.084: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:50:40.036: W/ActivityManager(596): mDVFSHelper.release()
04-21 09:50:49.916: E/Watchdog(596): !#Sync 1247
04-21 09:50:52.789: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 144530276 , called by : android, intent:Intent { act=android.net.ConnectivityService.action.PKT_CNT_SAMPLE_INTERVAL_ELAPSED flg=0x4000000 }
04-21 09:50:52.849: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143870336 , called by : com.google.android.gms, intent:Intent { cmp=com.google.android.gms/.lockbox.LockboxAlarmReceiver }
04-21 09:50:59.996: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143877482 , called by : android, intent:Intent { act=android.intent.action.TIME_TICK flg=0x50000000 }
04-21 09:51:00.076: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:51:00.076: E/accuweather(2304): [AccuTab_Magagine]>>> UIMK:1463 [0:0] time : 08:51
04-21 09:51:00.096: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:51:03.719: E/memtrack(26128): Couldn't load memtrack module (No such file or directory)
04-21 09:51:03.719: E/android.os.Debug(26128): failed to load memtrack module: -2
04-21 09:51:03.900: W/ActivityManager(596): No content provider found for permission revoke: file:///data/local/tmp/MyGame.apk
04-21 09:51:19.915: E/Watchdog(596): !#Sync 1248
04-21 09:51:30.275: W/ApplicationPackageManager(25304): getCSCPackageItemText()
04-21 09:51:42.527: W/ActivityManager(596): No content provider found for permission revoke: file:///data/local/tmp/MyGame.apk
04-21 09:51:43.588: E/PackageManager(596): parse pkg : /data/app/vmdl276537072.tmp
04-21 09:51:43.618: E/PackageManager(596): dexopt start
04-21 09:51:44.980: E/PackageManager(596): dexopt end
04-21 09:51:49.915: E/Watchdog(596): !#Sync 1249
04-21 09:51:53.068: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143930557 , called by : com.google.android.gms, intent:Intent { cmp=com.google.android.gms/.lockbox.LockboxAlarmReceiver }
04-21 09:51:56.111: W/PackageManager(596): verifying app can be installed or not
04-21 09:51:56.331: W/PackageManager(596): Not granting permission android.permission.INSTALL_LOCATION_PROVIDER to package com.companyName.GameName (protectionLevel=18 flags=0x8be46)
04-21 09:51:56.511: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:51:56.561: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:51:56.771: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:51:56.781: W/ApplicationPackageManager(930): getCSCPackageItemText()
04-21 09:51:56.781: W/ApplicationPackageManager(930): getCSCPackageItemText()
04-21 09:51:56.781: E/SamsungIME(1471): mOCRHelper is null
04-21 09:51:56.941: W/ApplicationPackageManager(951): getCSCPackageItemText()
04-21 09:51:58.343: W/ApplicationPackageManager(1195): getCSCPackageItemText()
04-21 09:51:58.453: E/EdmStorageProvider(596): Admin not in database, something went wrong
04-21 09:51:59.103: W/AlarmManager(596): Set alarm: type= 0 triggerAtTime= 1492761134119 , called by : com.android.vending, intent:Intent { cmp=com.android.vending/com.google.android.finsky.services.ContentSyncService }
04-21 09:51:59.344: W/IcingInternalCorpora(1352): getNumBytesRead when not calculated.
04-21 09:51:59.354: E/memtrack(26153): Couldn't load memtrack module (No such file or directory)
04-21 09:51:59.354: E/android.os.Debug(26153): failed to load memtrack module: -2
04-21 09:51:59.504: E/Finsky(25304): [1] com.google.android.finsky.wear.bl.a(847): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
04-21 09:51:59.814: W/ActivityManager(596): mDVFSHelper.acquire()
04-21 09:51:59.994: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143937482 , called by : android, intent:Intent { act=android.intent.action.TIME_TICK flg=0x50000000 }
04-21 09:52:00.215: W/ActivityManager(596): Permission Denial: getCurrentUser() from pid=26179, uid=10129 requires android.permission.INTERACT_ACROSS_USERS
04-21 09:52:00.245: W/ApplicationPackageManager(26179): getCSCPackageItemText()
04-21 09:52:00.275: W/ActivityManager(596): Permission Denial: getCurrentUser() from pid=26179, uid=10129 requires android.permission.INTERACT_ACROSS_USERS
04-21 09:52:00.615: E/JniHelper(26179): Failed to find static java method. Class name: (null), method name: getCocos2dxPackageName, signature: ()Ljava/lang/String;
04-21 09:52:00.615: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:52:00.625: A/libc(26179): Fatal signal 11 (SIGSEGV) at 0xfffffff4 (code=1), thread 26179 (peFromTheIsland)
04-21 09:52:00.635: E/accuweather(2304): [AccuTab_Magagine]>>> UIMK:1463 [0:0] time : 08:52
04-21 09:52:00.645: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:52:00.865: W/SQLiteConnectionPool(1352): A SQLiteConnection object for database '+data+data+com_google_android_gms+databases+metrics_db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
04-21 09:52:00.875: W/SQLiteConnectionPool(1352): A SQLiteConnection object for database '+data+data+com_google_android_gms+databases+help_responses_db_18' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
04-21 09:52:00.875: W/SQLiteConnectionPool(1352): A SQLiteConnection object for database '+data+data+com_google_android_gms+databases+auto_complete_suggestions_db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
04-21 09:52:00.875: W/ApplicationPackageManager(1352): getCSCPackageItemText()
04-21 09:52:01.165: W/ActivityManager(596): Force finishing activity com.companyName.GameName/org.cocos2dx.cpp.AppActivity
04-21 09:52:01.206: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:52:01.216: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:52:01.516: E/android.os.Debug(596): !#Dumpstate > dumpstate -k -t -z -d -m 26179 -o /data/log/dumpstate_app_error
04-21 09:52:01.596: W/ContextImpl(596): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1372 com.android.server.analytics.data.collection.application.CrashAnrDetector.broadcastEvent:296 com.android.server.analytics.data.collection.application.CrashAnrDetector.processDropBoxEntry:254 com.android.server.analytics.data.collection.application.CrashAnrDetector.access$100:60 com.android.server.analytics.data.collection.application.CrashAnrDetector$1.onReceive:102
04-21 09:52:01.716: W/ActivityManager(596): Activity pause timeout for ActivityRecord{425a2d00 u0 com.companyName.GameName/org.cocos2dx.cpp.AppActivity t89 f}
04-21 09:52:01.906: W/ActivityManager(596): mDVFSHelper.release()
04-21 09:52:02.577: W/ApplicationPackageManager(596): getCSCPackageItemText()
LogCat (Filtered for application (Full)):
04-21 09:52:00.185: D/ActivityThread(26179): handleBindApplication:com.companyName.gameName
04-21 09:52:00.245: W/ApplicationPackageManager(26179): getCSCPackageItemText()
04-21 09:52:00.265: D/DisplayManager(26179): DisplayManager()
04-21 09:52:00.305: D/dalvikvm(26179): Trying to load lib /data/app-lib/com.companyName.gameName-1/libMyGame.so 0x41ccab70
04-21 09:52:00.615: E/JniHelper(26179): Failed to find static java method. Class name: (null), method name: getCocos2dxPackageName, signature: ()Ljava/lang/String;
04-21 09:52:00.625: A/libc(26179): Fatal signal 11 (SIGSEGV) at 0xfffffff4 (code=1), thread 26179 (peFromTheIsland)
<uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER"/>
remove this permission from Manifest file. you can only use normal and Dangerous permission.
A third-party developer cannot grant to his/her application the permission required to install a new location provider (android.permission.INSTALL_LOCATION_PROVIDER). Only OEMs are allowed to install a new location provider.
EDIT
<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature"/>
EDIT
check package name I see com.companyName.gameName in AndroidManifest.xml, you are running your app using package com.companyName.GameName and AppActivity is in org.cocos2dx.cpp
This issue was caused by extern Userdefaults in Constants. To fix it I changed (Constants.cpp):
cocos2d::UserDefault *userDefaults = cocos2d::UserDefault::getInstance();
Constants.hpp:
extern cocos2d::UserDefault *userDefaults;
To:
Constants.cpp
cocos2d::UserDefault *userDefaults;
And (AppDelegate.cpp)
userDefaults = cocos2d::UserDefault::getInstance();
Have not done any changes to Constants.hpp.
Permissions is not required and also were was no problem with package name.
Logcat messages was not helpfull...
I have imported the Play Service sucessfully. But now when I want to loggin in with my device there is an error called:
The Application is incorrectly configured. Check that the package name and signing certificat match the client Id created in Developer Console. Also, if the application is not published yet, check that the account you are testing is an tester account. See log for more Information.
But the App is correytly the Id is correyt and the package name too.
I have also two accounts one is Tester the other not.
Loact is:
09-08 18:04:10.223 20100-20100/? E/Zygote﹕ MountEmulatedStorage()
09-08 18:04:10.223 20100-20100/? E/Zygote﹕ v2
09-08 18:04:10.223 20100-20100/? I/libpersona﹕ KNOX_SDCARD checking this for 10436
09-08 18:04:10.223 20100-20100/? I/libpersona﹕ KNOX_SDCARD not a persona
09-08 18:04:10.233 20100-20100/? I/SELinux﹕ Function: selinux_compare_spd_ram, SPD-policy is existed. and_ver=SEPF_SM-G900F_4.4.2 ver=34
09-08 18:04:10.233 20100-20100/? I/SELinux﹕ Function: selinux_compare_spd_ram , priority [2] , priority version is VE=SEPF_SM-G900F_5.0_0014
09-08 18:04:10.233 20100-20100/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
09-08 18:04:10.233 20100-20100/? I/art﹕ Late-enabling -Xcheck:jni
09-08 18:04:10.263 20100-20100/de.developer.sixtysix.hiddenandroid D/TimaKeyStoreProvider﹕ TimaSignature is unavailable
09-08 18:04:10.263 20100-20100/de.developer.sixtysix.hiddenandroid D/ActivityThread﹕ Added TimaKeyStore provider
09-08 18:04:10.293 20100-20100/de.developer.sixtysix.hiddenandroid D/ResourcesManager﹕ creating new AssetManager and set to /data/app/de.developer.sixtysix.hiddenandroid-2/base.apk
09-08 18:04:10.493 20100-20100/de.developer.sixtysix.hiddenandroid D/Activity﹕ performCreate Call secproduct feature valuefalse
09-08 18:04:10.493 20100-20100/de.developer.sixtysix.hiddenandroid D/Activity﹕ performCreate Call debug elastic valuetrue
09-08 18:04:10.503 20100-20116/de.developer.sixtysix.hiddenandroid D/OpenGLRenderer﹕ Render dirty regions requested: true
09-08 18:04:10.523 20100-20116/de.developer.sixtysix.hiddenandroid I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: ()
OpenGL ES Shader Compiler Version: E031.25.01.03
Build Date: 03/03/15 Tue
Local Branch: LA.BF.1.1_RB1_20150108_025_1077123_1158499
Remote Branch:
Local Patches:
Reconstruct Branch:
09-08 18:04:10.523 20100-20116/de.developer.sixtysix.hiddenandroid I/OpenGLRenderer﹕ Initialized EGL, version 1.4
09-08 18:04:10.543 20100-20116/de.developer.sixtysix.hiddenandroid I/OpenGLRenderer﹕ HWUI protection enabled for context , &this =0xaed22088 ,&mEglDisplay = 1 , &mEglConfig = 8
09-08 18:04:10.543 20100-20116/de.developer.sixtysix.hiddenandroid D/OpenGLRenderer﹕ Enabling debug mode 0
09-08 18:04:10.723 20100-20100/de.developer.sixtysix.hiddenandroid I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#216b7be4 time:20690728
09-08 18:04:13.503 20100-20100/de.developer.sixtysix.hiddenandroid I/Timeline﹕ Timeline: Activity_launch_request id:de.developer.sixtysix.hiddenandroid time:20693503
09-08 18:04:13.613 20100-20100/de.developer.sixtysix.hiddenandroid W/PopupManager﹕ You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
09-08 18:04:13.633 20100-20100/de.developer.sixtysix.hiddenandroid I/MediaPlayer﹕ Need to enable context aware info
09-08 18:04:13.633 20100-20100/de.developer.sixtysix.hiddenandroid E/MediaPlayer-JNI﹕ QCMediaPlayer mediaplayer NOT present
09-08 18:04:13.663 20100-20119/de.developer.sixtysix.hiddenandroid W/MediaPlayer﹕ info/warning (973, 0)
09-08 18:04:13.663 20100-20100/de.developer.sixtysix.hiddenandroid E/MediaPlayer﹕ Should have subtitle controller already set
09-08 18:04:13.673 20100-20100/de.developer.sixtysix.hiddenandroid I/GAv4﹕ Google Analytics 7.8.95 is starting up. To enable debug logging on a device run:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
09-08 18:04:13.693 20100-20100/de.developer.sixtysix.hiddenandroid W/GAv4﹕ AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See for instructions.
09-08 18:04:13.713 20100-20100/de.developer.sixtysix.hiddenandroid W/GAv4﹕ CampaignTrackingReceiver is not registered, not exported or is disabled. Installation campaign tracking is not possible. for instructions.
09-08 18:04:13.723 20100-20100/de.developer.sixtysix.hiddenandroid D/Activity﹕ performCreate Call secproduct feature valuefalse
09-08 18:04:13.723 20100-20100/de.developer.sixtysix.hiddenandroid D/Activity﹕ performCreate Call debug elastic valuetrue
09-08 18:04:13.723 20100-20183/de.developer.sixtysix.hiddenandroid W/GAv4﹕ AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See for instructions.
09-08 18:04:13.733 20100-20100/de.developer.sixtysix.hiddenandroid E/MediaPlayer﹕ Should have subtitle controller already set
09-08 18:04:13.733 20100-20113/de.developer.sixtysix.hiddenandroid W/MediaPlayer﹕ info/warning (702, 0)
09-08 18:04:13.843 20100-20100/de.developer.sixtysix.hiddenandroid I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#34d3307b time:20693840
09-08 18:04:22.433 20100-20100/de.developer.sixtysix.hiddenandroid I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#34d3307b time:20702432
09-08 18:04:24.933 20100-20100/de.developer.sixtysix.hiddenandroid D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
09-08 18:04:25.073 20100-20100/de.developer.sixtysix.hiddenandroid E/ViewRootImpl﹕ sendUserActionEvent() mView == null
Thanks for your answers.
Tim
The app runs fun for most of devices.However there are some of devices which use MTK6592 or so can not launch it.The log which I get is like below:
04-21 15:50:42.019 25924-25953/com.q.q E/CellLocation﹕ create GsmCellLocation
04-21 15:50:42.035 25924-25924/com.q.q E/linker﹕ load_library(linker.cpp:759): library "libmaliinstr.so" not found
04-21 15:50:42.037 25924-25924/com.qingdaonews.bus E/﹕ appName=com.q.q, acAppName=com.android.cts.openglperf