This is my code :
window.location.href = 'intent://#Intent;package=mypackagename;scheme=myscheme;S.browser_fallback_url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%3Fhl%3Den;end;';
This is present in the AndroidManifest.xml of the android app:
<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="myscheme" />
</intent-filter>
It is saying "Invalid operation". What am I doing wrong?