How to get Android Market licensing sample to work? - android

I downloaded the sdk and added the library to my workspace, then the sample for market licensing. The sample app seems to force close somewhere after/during the instantiation of LicenseChecker. I tried running on the emulator with Google API 8 and on a droid x with froyo and it force closes. The stack shows PerformLaunchActivity as the top item.
Both emulator and phone had a registered gmail account.
Any ideas how to get this to work?

Ok, simple answer was look in the code and replace the public key as it says.

Related

Google Places Autocomplete Can't load search results

I am trying to implement the Google Places Autocomplete API sometimes I am able to get location list but sometimes I get "can't load search results" message. Can someone pease help me with the issue.
This issue have a few possible reasons:
No billing account associated to the project
If you are still using the old Places
SDK
If you reach your quota limit(e.g. self imposed cap
usage)
If your app is not properly
restricted
If any of the above doesn't fix your issue, it would be best to reach out to the support team of the Google Maps Platform as this error commonly has something to do with your configuration in the GCP console wherein only the support team of Google Maps Platform can assist you.
Hope this helps.
i already added the billing service also then get the same error then i added the api key in gradle file and then its works for me
Added your api RNGP_ANDRIOD_API_KEY=***** in gradle.properties
If any of the above still doesnt work, and if you happen to be using an emulator to run the app, try uninstalling the app, then re-installing it when you run the program in android studios.
Background info:
I happened to encounter this issue on my emulator despite doing everything mentioned above, but when I tried downloading the app onto my phone, I found it working there so I tried uninstalling the app on my emulator and it worked after.

Black screen after updating Google Play Services:7.5.0

I updated my Google Play Service to be able to use Android 5.0 Material Design Support Library.
Since I did it, it happens quite often that my app end in ANR with a black screen , and Nothing in logs.
So basically, it becomes very hard to debug, when I don't have logs to help me!
I've checked /data/anr/traces.txt but there is not much and process to extract it is not so fast...
Is there a solution to that or should I revert Google Play Service to his old version and wait more stable release???
PS: I upgraded Google Play Service through SDK Manager.
Is there a way to revert Google Play Service to the old version???
EDIT: It might be a solution to manage Android SDK in a Git Rep.
So revert changes would be no problem
Screenshot :
double tap the home button.. that voice command will open.. press and say settings, and from the settings uninstall the updates of google play services..

VideoCast Sample App on Android does not detect cast device

I have downloaded and built the CastCompanionLibrary and CastVideos-android sample code from github, after updating google play services library etc.
I have modified the strings file to enter my AppId.
I have a test device configured in the developer console, and also I configured an app (is the sample video app in this case) and I entered the same package name as in the AndroidManifest.xml for the app.
The app start, runs and shows lists of videos - but does not seem to detect the chromecast device as on button is added to the ActionBar.
I am now trying to publish the sample app to see if that fixes it, but following the instructions and using the stock sample code is not working for me so far.
What am I doing wrong?
Andrew, which XML file you were referring to that had Pay Service version stuff in it? As to your issue, my suggestion is:
(1) Make sure your devices is whitelisted for your app. I imagine you are creating an app id on the dev console and using that app id. If your device is whitelisted, you should be able to access it using a chrome browser at http://<chromecast-ip>:9222, if you cannot access that, your device is not whitelisted. To troubleshoot, take a look at this post.
(2) After your device is set up for development, then make sure you put the app id in the strings.xml. Make sure your dependencies are set correctly: the companion library depends on appcompat and mediarouter from v7 of the support libraries, and rev 15 of play store library. The CastVideos-android only depends on the companion library.
If you follow these steps, all should work.
OK here is my summary of things I had to do to get things working with an unpublished app:
Double-check the Device ID. It's difficult to read and some characters could be wrong. Taking a photo in good lighting is a good idea.
Configure the device in the dev console (https://cast.google.com/publish/#/overview), register it and wait. Then later I had to reboot my Chromecast device (in fact twice). I used the chromecast app (Mac OS X) which you can download from here: https://cast.google.com/chromecast/setup
I had poor Wi-Fi performance that made my Android device change WiFi SSID to a different one from where the ChromeCast was connected. Latest versions of Android seem to test response time and bandwidth and then may change if deemed "unstable" (I had it overloaded with downloads) and there is another better one available. So, double check you are on the correct WiFi on Android.
Off course, configure the app in the dev console and past the (Case Sensitive) app id into the app_id string in the strings.xml file in the Android res/values folder.
I think that´s all. Happy casting!
I have the exact same issue, the cast video sample app doesn't find my chromecast so it doesn't show the "cast button" in the action bar.
Like you, in https://cast.google.com/publish/#/overview i have set up a new Styled Media Receiver application with the Android platform and set the package name to : com.google.sample.cast.refplayer
Then i found this : https://developers.google.com/cast/docs/receiver_apps#default
So i changed CastApplication.java in the onCreate method :
APPLICATION_ID = CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID;
Now it works, i can see the cast button and send videos to my chromecast.
But i still can't use my own application to use my own receiver.
I published my application from the Cast developer console (https://cast.google.com/publish/#/overview) and that seems to have fixed it.
BTW: Other people may have had uppercase/lowercase problems with the app ID - but not me.
I took the advice of some google page, and took a photograph of my Chromecast close up....with that unreadable laser etched ID.....
Then I zoomed in and checked.....and yes, I had a '8' instead of a 'B' in my device ID, probably causing my device to be not WhiteListed as mentioned by Ali Naddaf.
I deleted the old device, and created a new one with the correct Device ID. Then I had to wait 15mins for it to be registered.
So, I changed the package name of the sample in AndroidManifest.xml, I created a new Android app in the dev console with that package name, and put the new App Id into the code (strings.xml) and rebuilt and deployed my Android app.
All that did NOT work and the chromecast did not appear......so for now, using a published app is the only thing that works for me.

Google Play Services has to be updated for my app to run on emulator, Need to run the app on emulator only as I have to find the id's.

I am trying to automate an android application using Robotium. I am trying to find the id's of the elements using Hierarchyviewer on the emulator. When I launch my app on the emulator it says "Update Google Play Services" and app closes. I tried all the solutions to updated Google Play Services on Emaultor- NO USE. Tried with AVD - Google API 4.2.2 as well.
Please let me how do I proceed from here.
As pointed out by GrIsHu you should be able to follow what is on that page. If you really cannot get that to work, I might suggest trying to use an alternative emulator Genymotion This makes it really easy to get new emulators that run fast and also gives you a few extra features.

Android: Licencing sample app works but integration doesn't

I've just finished designing a small android app and have now come to a point where i want to license this app and add it to the android market. I've implemented the LVL without any problems but when i come to test the licensing i am always getting the response "NOT_LICENSED" even though in the developer panel i have set the response to "LICENSED". I then uploaded the sample licensing app through the developers panel and tested it, this works fine and returns whatever i set the response to be.
I have copied and pasted the whole sample project into my existing project and am still getting the same response. Is there something i am missing?
My app in the developers panel is unpublished but still it should return a licensed response shouldn't it?
Thanks
Not sure why this wasn't working but i found a way to fix it anyway. I had to remove my app from the market then re-add it.

Categories

Resources