Webview avoid security alert from google play upon implementation of onReceivedSslError

To properly handle SSL certificate validation, change your code to invoke SslErrorHandler.proceed() whenever the certificate presented by the server meets your expectations, and invoke SslErrorHandler.cancel() otherwise. As email said, onReceivedSslError should handle user is going to a page with invalid cert, such like a notify dialog. You should not proceed it directly. For example, I … Read more

Get referrer after installing app from Android Market

I would try to help who, like me, fails to make install_referrer work and who don’t find ANY useful information about these features. Notes: The intent com.android.vending.INSTALL_REFERRER will be caught during the install process, not when the application starts for the first time. The referrer …extras.getString(“referrer”).. is fixed but the contents can be any string … Read more

How to prevent multiple instances of an Activity when it is launched with different Intents

Add this to onCreate and you should be good to go: // Possible work around for market launches. See https://issuetracker.google.com/issues/36907463 // for more details. Essentially, the market launches the main activity on top of other activities. // we never want this to happen. Instead, we check if we are the root and if not, we … Read more

The apk must be signed with the same certificates as the previous version

Nothing. Read the documentation: Publishing Updates on Android Market Before uploading the updated application, be sure that you have incremented the android:versionCode and android:versionName attributes in the element of the manifest file. Also, the package name must be the same and the .apk must be signed with the same private key. If the package name … Read more

updating Google play services in Emulator

Update On 18-Dec-2017 You can update Google Play Services via the Play Store app in your emulator just as you would on a physical Android device from API 24. check Emulator new features added with stable update from Android Studio v 3.0 Google Play Support – From Google : We know that many app developers … Read more

Android app is supported by 0 devices

I had faced a similar issue when I had declared camera hardware in uses-feature tag in manifest file in my application as follows: <uses-feature android:name=”android.hardware.camera”> If you don’t specify the android:required attribute it defaults to “true”. Thus, Google Play Store will assume that the application will not work unless the camera hardware is present. Once … Read more

Check if application is installed – Android

Try this: private boolean isPackageInstalled(String packageName, PackageManager packageManager) { try { packageManager.getPackageInfo(packageName, 0); return true; } catch (PackageManager.NameNotFoundException e) { return false; } } It attempts to fetch information about the package whose name you passed in. Failing that, if a NameNotFoundException was thrown, it means that no package with that name is installed, so … Read more

How to open the Google Play Store directly from my Android application?

You can do this using the market:// prefix. Java final String appPackageName = getPackageName(); // getPackageName() from Context or Activity object try { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(“market://details?id=” + appPackageName))); } catch (android.content.ActivityNotFoundException anfe) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(“https://play.google.com/store/apps/details?id=” + appPackageName))); } Kotlin try { startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(“market://details?id=$packageName”))) } catch (e: ActivityNotFoundException) { startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(“https://play.google.com/store/apps/details?id=$packageName”))) } We use a … Read more