Getting net::ERR_UNKNOWN_URL_SCHEME while calling telephone number from HTML page in Android

The following should work and not require any permissions in the manifest (basically override shouldOverrideUrlLoading and handle links separately from tel, mailto, etc.): mWebView = (WebView) findViewById(R.id.web_view); WebSettings webSettings = mWebView.getSettings(); webSettings.setJavaScriptEnabled(true); mWebView.setWebViewClient(new WebViewClient(){ @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if( url.startsWith(“http:”) || url.startsWith(“https:”) ) { return false; } // Otherwise allow the … Read more

Integrate ZXing QR code scanner without installing BarCode Scanner

Finally I got the answer, As of ADT 14,the resource fields(such as R.id.decode) are no longer constants when defined in library projects So in the ZXing library->android->com.google.zxing.client.android.CaptureActivityHandler.java and DecodeHandler.java Replace both of these classes switch case statements with if-else,and then import this ZXing library into your project.. Rest of the coding of my own project … Read more

Android: Disable application for tablet

This prevents access on tablets, but allows the new density buckets (xxhdpi and xxxhdpi) and avoids errors on projects that are compiled against lower SDKs. It should be a direct child of the <manifest> element in AndroidManifest.xml <compatible-screens> <!– all small size screens –> <screen android:screenSize=”small” android:screenDensity=”ldpi” /> <screen android:screenSize=”small” android:screenDensity=”mdpi” /> <screen android:screenSize=”small” android:screenDensity=”hdpi” … Read more

Possible to use multiple authorities with FileProvider?

My solution to this problem has actually been to avoid relying on a single FileProvider parsing multiple authorities. While this doesn’t directly address the question as stated, I’m posting it for posterity. I updated my library to leverage an empty subclass of FileProvider, so that the library’s updated manifest provider entry is now: <provider android:name=”.flow.email.screenshot.BugShakerFileProvider” … Read more

How can you get the Manifest Version number from the App’s (Layout) XML variables?

There is not a way to directly get the version out, but there are two work-arounds that could be done. The version could be stored in a resource string, and placed into the manifest by: <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.somepackage” android:versionName=”@string/version” android:versionCode=”20″> One could create a custom view, and place it into the XML. The view would … Read more

Android error “unable to find explicit activity class”

The first parameter is application package not the package where the activity is. You can invoke the Activity like this. Intent i = new Intent(); i.setClassName(“com.WAPP”, “com.WAPP.SetLocation.setLocationActivity”); startActivity(i); It is preferred as SYLARRR suggested to have Android automatically figure that out for you. Hence the call as.. startActivity(new Intent(this, setLocationActivity.class)); It’s recommended per java standards … Read more