Android deep link in webview not opening the app - java

i used webview to create app and implemented deep linking like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ariagp.yazdarzan">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<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="yazdarzan.com" />
</intent-filter>
</activity>
</application>
</manifest>
now its asking for open link in my app, but it will not actually open with the app
for example: I click on the link shared in whatsApp, it will asking me for open in my app, i will choose the app but the link will open in whatsApp builtin browser
where is the problem?

try this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ariagp.yazdarzan">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name="com.ariagp.yazdarzan.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<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="yazdarzan.com" />
</intent-filter>
</activity>
</application>
</manifest>

Related

Default Activity not Found, Error Running App

This is my AndroidManifest.XML
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.user.mypos">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<application
android:hardwareAccelerated="true"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PrintManager"
android:label="#string/title_activity_print" >
</activity>
<activity
android:name=".MCRManager"
android:label="#string/title_activity_msr" >
</activity>
<activity
android:name=".ICCManager"
android:label="#string/title_activity_icc" >
</activity>
</application>
It was working just fine, until today, i'm not sure what to do.
I've already tried Invalidate Caches and Restart, Cleaning Project, and Rebuiliding
Edit: I added some of the code that got lost in the copy-page
Where is your manifest tag?
Also add category to other activities.
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.user.mypos">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PrintManager"
android:label="#string/title_activity_print">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".MCRManager"
android:label="#string/title_activity_msr">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".ICCManager"
android:label="#string/title_activity_icc">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>

Play Store says app is incompatible with phone tested on

The Play Store says that my app is incompatible with all the devices that I have, but that also includes the phone that I tested it on. Below is my Manifest file. I tested it on my Nexus 5X running Nougat, but the Play Store says that the app is incompatible with that phone of mine. Thanks a lot !
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.health4everyone.thejdeep.healthpal">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#####" />
<activity android:name="com.heath4everyone.thejdeep.healthpal.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.heath4everyone.thejdeep.healthpal.Home"></activity>
<activity android:name="com.heath4everyone.thejdeep.healthpal.Hospitals"></activity>
<activity
android:name="com.heath4everyone.thejdeep.healthpal.Restaurants"
android:label="Map">
</activity>
<activity android:name="com.heath4everyone.thejdeep.healthpal.ActivityTracker"></activity>
<activity android:name=".Settings" android:label="#string/app_name">
<intent-filter>
<action android:name="com.health4everyone.thejdeep.healthpal.Settings" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.heath4everyone.thejdeep.healthpal.SearchFoodByRestaurant"
android:label="Search Restaurant">
</activity>
</application>
</manifest>
Edit : Removed the API key :)

Android Cordova App crashes with ClassNotFoundException?

I have a problem with an android app. The following is the error message I get:
11-06 18:15:02.606: E/AndroidRuntime(2424): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{de.wiedemann.mobile/de.wiedemann.mobile.WIEDEMANN}: java.lang.ClassNotFoundException: Didn't find class "de.wiedemann.mobile.WIEDEMANN" on path: DexPathList[[zip file "/data/app/de.wiedemann.mobile-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
I tried the following things:
Delete R.java
Clean project
Check all dependencies under project preferences -> order and export
Uncheck "Is Library" under Tab "Android" under Project Preferences
Restart Eclipse
Try another workspace
Nothing works. Anyone knows how this error comes and how I can resolve it?
The Manifest:
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="16" android:versionName="0.0.1" android:windowSoftInputMode="adjustPan" package="de.wiedemann.mobile" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/app_name" android:launchMode="singleTop" android:name="WIEDEMANN" android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:clearTaskOnLaunch="true" android:configChanges="orientation|keyboardHidden" android:exported="false" android:name="com.google.zxing.client.android.CaptureActivity" android:screenOrientation="landscape" android:theme="#android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:label="#string/share_name" android:name="com.google.zxing.client.android.encode.EncodeActivity">
<intent-filter>
<action android:name="com.phonegap.plugins.barcodescanner.ENCODE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:label="#string/share_name" android:name="com.google.zxing.client.android.HelpActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>
EDIT:
Just simply rename the android:name in your activity tag to wiedemann.app.WIEDEMANN. After watching the screenshot
http://imgur.com/oYTN4ZN
it came to my mind I was proposing wrong answer previously.
Or Just paste this in manifest.xml:
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="16" android:versionName="0.0.1" android:windowSoftInputMode="adjustPan" package="de.wiedemann.mobile" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/app_name" android:launchMode="singleTop" android:name="wiedemann.app.WIEDEMANN" android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:clearTaskOnLaunch="true" android:configChanges="orientation|keyboardHidden" android:exported="false" android:name="com.google.zxing.client.android.CaptureActivity" android:screenOrientation="landscape" android:theme="#android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:label="#string/share_name" android:name="com.google.zxing.client.android.encode.EncodeActivity">
<intent-filter>
<action android:name="com.phonegap.plugins.barcodescanner.ENCODE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:label="#string/share_name" android:name="com.google.zxing.client.android.HelpActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>
rename package path (in Eclipse, not in Manifest) of WIEDEMANN.java into wiedemann.app > de.wiedemann.mobile (as you can see in gen folder correct package name). Please, change symbols to lower case. Use F2 hot key in order to rename;)

Google Play - Icon not valid

I get this error that my icon is not valid.. The thing is that it's the same icon as in the previous version, I just renamed it and now it doesn't work any more.. Even if I name it back like it was before..
Here is my Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ml.dannyb.packagetracker"
android:versionCode="10"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name=".activities.MyApplication"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".activities.Home"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activities.PackageDetails" />
<activity
android:name=".activities.BarcodeScannerActivity"
android:configChanges="orientation|screenSize" />
<service android:name=".workers.ServiceBackgroundChecker" />
<receiver
android:name=".workers.BroadcastReceiverStartBackgroundService"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<action android:name="ml.dannyb.packageTracker.SERVICE_START" />
</intent-filter>
</receiver>
<receiver
android:name=".workers.BroadcastReceiverBoot"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
</manifest>
Ohh.. How lame.. I had the image as a png and as a jpeg and I thought I need a special image for Lollipop+ notifications so I edited the png so I was left out with only the jpeg and there came the error.. After I converted jpeg to png everything works perfectly.. No Copyright issues :)

How to share a photo from gallery via My application

I just want my application make available for user to share a Photo from gallery using Share Via Intent Chooser. Additionally i want to perform basic action of my application just after choosing my application from share via Screen like watsapp. I don't have any idea about how to do. I searched around the Internet but i didn't get any satisfactory Solution. Infect i tried with this
but unfortunately using this code in manifest my application is got disappeared from the Home Screen Application list in my device.
have a look over my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.myAppName"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="preferExternal"
>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.RECORD_AUDIO" >
</uses-permission>
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!--
Creates a custom permission so only this app can receive its messages.
NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
where PACKAGE is the application's package name.
-->
<permission
android:name="com.app.myAppName.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.app.myAppName.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Keeps the device on vibrating mode when a message is received. -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.camera.front" />
<application
android:name="com.app.myAppName.TwitterApplication"
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.app.myAppName.SplashScreen"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<!--
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
-->
<action android:name="android.intent.action.SEND" >
</action>
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" >
</data>
</intent-filter>
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
<service
android:name=".TimelinesService"
android:label="Timelines Service" />
<service
android:name=".NotificationService"
android:label="NotificationService" />
<activity
android:name="com.facebook.LoginActivity"
android:label="#string/app_name" >
</activity>
<activity
android:name="LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="tweeter"
android:scheme="callback" />
</intent-filter>
</activity>
<activity android:name="com.app.myAppName.TweetsActivity" >
</activity>
<activity
android:name="HomeActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name="TwitterLogin"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name="AddUser"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="AddmyAppName"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="AddMemberTransparent"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name="AddAFriendActivity"
android:screenOrientation="portrait" >
</activity>
</application>
You application 'disappeared' because you commented these lines at SplashActivity section:
<!--
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
-->
as for share provider, which part are you stuck at?

Categories