my android application doesn't appear on my phone when I installed it - android

I've developed my first Android application and I have published it on Google play, but when I try to install it, it installs but doesn’t appear on the phone.
Here is the manifestAndroid.xml , I believe that my configuration is the reason why.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="testconverteo.ismail.converteo"
android:versionCode="5"
android:versionName="1.1b" >
<uses-permission android:name = "android.permission.INTERNET" />
<uses-permission android:name = "android.permission.ACCESS_NETWORK_STATE" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<!-- Used for Google Play Store Campaign Measurement-->
<application
android:name="Myapp"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<service android:name="com.google.android.gms.analytics.CampaignTrackingService" />
<receiver android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!-- The BROWSABLE category is required in order for the intent filter to be accessible from a web browser -->
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.appconverteo.com/application” -->
<data android:scheme="http"
android:host="www.appconverteo.com"
android:pathPrefix="/application" />
</intent-filter>
</activity>
<activity
android:name=".LoginDisplayActivity"
android:label="#string/title_activity_login_display" />
</application>
</manifest>
What should I do to solve this problem ?
Thanks

you need to separate the .MainActivity intent filter into two different intent filters.
one filter to appear on the launcher and a separate filter to be browsable.
<!-- this makes it available to the launcher -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- this makes it openable with browser -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.appconverteo.com/application” -->
<data android:scheme="http"
android:host="www.appconverteo.com"
android:pathPrefix="/application" />
</intent-filter>
ps.: you should test BEFORE pushing to Google Play.

You should have 2 intent filters inside your manifest, one for each intent type you want to receive.
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<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.BROWSABLE" />
<data android:scheme="http"
android:host="www.appconverteo.com"
android:pathPrefix="/application" />
</intent-filter>
</activity>
From android docs:
http://developer.android.com/guide/components/intents-filters.html
When you want to handle multiple kinds of intents, but only in
specific combinations of action, data, and category type, then you
need to create multiple intent filters.

I had the same issue and my solution was to remove another intent filter I assigned to another activity I tested before. Maybe this helps someone.

Related

Is it possible for one app to be listed multiple times as an Android share option (YouTube play & queue)

I am wondering if it's possible for my Android app to show 2 different 'share' options under YouTube's "share" (app picker) dialog?
My app is accepting an Android intent to get the shared URLs, but I would like to offer two share options within YouTube's app-picker dialog, one to directly play the URL and another to queue the URL (I don't want to display an additional dialog in my app).
Currently, in the app's manifest file, I specify :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.XX_Remote"
android:versionCode="202"
android:versionName="2.0.2"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:glEsVersion="0x00020000" android:required="True"/>
<application android:persistent="False"
android:restoreAnyVersion="False"
android:label="XX Remote"
android:debuggable="True"
android:largeHeap="False"
android:icon="#drawable/ic_launcher"
android:theme="#style/AppTheme"
android:hardwareAccelerated="true"
android:resizeableActivity="false">
<!-- Our activity is a subclass of the built-in NativeActivity framework class.
This will take care of integrating with our NDK code. -->
<activity android:name="com.embarcadero.firemonkey.FMXNativeActivity"
android:label="XX Remote"
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
android:launchMode="singleTask">
<!-- Tell NativeActivity the name of our .so -->
<meta-data android:name="android.app.lib_name"
android:value="XX_Remote" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="Play in XX">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter android:label="Queue in X">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<receiver android:name="com.embarcadero.rtl.notifications.NotificationAlarm" />
</application>
</manifest>
However, the second (queue) intent doesn't show up at all.
And if it did show up, I'm not sure how to read the intent's label by code so I can distinguish between the two intents.
One <activity> tag cannot match multiple intent filters simultaneously.
For that purpose you can use <activity-alias> in your manifest which presents same activity as a separate entity:
<activity android:name="com.embarcadero.firemonkey.FMXNativeActivity"
android:label="XX Remote"
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
android:launchMode="singleTask">
<!-- Tell NativeActivity the name of our .so -->
<meta-data android:name="android.app.lib_name"
android:value="XX_Remote" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- use only one intent filter for SEND action in activity tag-->
<intent-filter android:label="Play in XX">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<!-- note that we will use android:name for resolving if this alias was used to start activity -->
<activity-alias
android:targetActivity=".com.embarcadero.firemonkey.FMXNativeActivity"
android:name=".com.embarcadero.firemonkey.FMXNativeActivity.Queue">
<!-- Put second SEND action inside activity-alias tag -->
<intent-filter android:label="Queue in X">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity-alias>
Then inside your activity you can resolve if it was started through alias by checking intents component:
// inside onCreate and/or onNewIntent (after resolving that intent action is SEND):
if (intent.component.className.endsWith(".Queue"){
// putting data in the queue...
} else {
// playing requested data...
}

App icon doesn't appear after implementing deep links to my app

I'm developing an app in Android Studio it works pretty well, but after implementing deep links to my launching activity my app doesn't you the app icon in the menu, I know the app is installed cause in Setting>Applications it appears. I know the problem is in the manifest.xml, so I'll leave a copy down bellow.
I'll love to hear about your solutions, by the way if you are reading this thanks.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dev.misterj.nocherd">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permision.CALL_PHONE"/>
<uses-permission android:name="android.permission.MANAGE_OWN_CALLS"/>
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAiJNpq-********************" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="#xml/network_security_config"
android:theme="#style/AppTheme">
<activity android:name=".StartActivity">
<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" />
<!-- Accepts URIs that begin with "https://myapp.com/place” -->
<data android:scheme="https" android:host="myapp.com" android:pathPrefix="/place" />
<!-- Accepts URIs that begin with "myapp://place” -->
<data android:scheme="myapp" android:host="place" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
</activity>
</manifest>
You should separate the intent filters, also your manifest file is not well-formatted. you should close the application tag. you can open it with an external application like google chrome, it will tell you if the XML is not in correct format.
<activity android:name=".StartActivity">
<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="myapp" android:host="place"/>
</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="myapp.com" android:pathPrefix="/place" />
</intent-filter>
</activity>
it's important that you create separate filters when your intention is to declare unique URLs (such as a specific combination of scheme and host) because multiple <data> elements in the same intent filter are actually merged together to account for all variations of their combined attributes. if you combine them it actually supports https://place and also supports myapp://myapp.com/place.
So you should separate them.

How can I open my React Native App from the browser?

I would like to open my app from the browser.
example: I open a browser, type in: https://open.my.app, or app://www.example.com and have my app as an option come up.
I read about Deep Links and I am quite sure I set up my project properly, YET nothing happens when I either try to type and run: https://open.my.app, app://www.example.com
My AndroidManifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.somemobileapp">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:allowBackup="false"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:launchMode="singleTask"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Change these two in the future to a proper one -->
<data android:scheme="https" android:host="www.example.com" />
<data android:scheme="app" android:host="open.my.app" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
So even after this, it's not working.
I know it will sound strange but keeping the data tag on first worked for me
<intent-filter>
<!-- data on first -->
<data android:scheme="http" android:host="abc.in"/>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>

Android app does not install with intent.action.VIEW

When I add an intent filter (to enable Google to crawl my app content and allow users to enter my app from search results) then my app still runs from Android Studio on my phone but it no longer installs.
My manifest is below, I have commented out the added intent filter to make it install again, so now I get a warning that it is not indexable by Google search.
What can I do so it installs and is indexable?
This is my first app so apologies if this is obvious but I appreciate any help. Thanks.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.somename.myappname">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<!--action android:name="android.intent.action.VIEW" /-->
<action android:name="android.intent.action.MAIN" />
<!--category android:name="android.intent.category.DEFAULT" /-->
<!--category android:name="android.intent.category.BROWSABLE" /-->
<category android:name="android.intent.category.LAUNCHER" />
<!--data android:scheme="somename"
android:host="myappname" /-->
</intent-filter>
</activity>
<activity android:name=".ChildActivity">
</activity>
</application>
</manifest>
I seem to have found the solution. There should be 2 separate intent filters ...
<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="http"
android:host="www.mywebsite.com"
android:pathPrefix="/myappname" />
</intent-filter>

Custom scheme doesn't seem to launch in the app intent

I'm trying to create an Android app that needs to use OAuth to authenticate (with the Google Wave data API)
I've specified a custom scheme in my AndroidManifest.xml so that any views to a url beginning "braindump://" should go to my app:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.enigmagen.braindump"
android:versionName="0.1"
android:versionCode="1">
<uses-sdk android:minSdkVersion="7"></uses-sdk>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:icon="#drawable/icon"
android:label="#string/app_name"
android:debuggable="true">
<activity
android:name=".BrainDump"
android:label="#string/app_name"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="braindump" />
</intent-filter>
</activity>
</application>
</manifest>
All that happens though is that after the redirect, the browser address shows the correct URL, but the page content is
You do not have permission to open this page.
braindump://rest_of_address_here
Is there a specific permission that needs to be set to allow this sort of behaviour?
I had the exact same problem (OAuth) and this is how I fixed it.
I've separated my Main from the class that will act on the URI.
Here's how the AndroidManifest.xml should look like:
<?xml version="1.0" encoding="utf-8"?>
[snip]
<activity android:label="#string/app_name" android:name="MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:label="#string/app_name" android:name="OAUTHActivity">
<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" android:host="oauth" />
</intent-filter>
</activity>
</application>
[/snip]
And I was able to open URIs like myscheme//oauth?oauth_verifier=xxx&oauth_token=yyy
Actually, it's possible to do it with only one activity, just creating one more intent filter. Like this:
<activity android:name=".MyActivity"
android:label="#string/app_name">
<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="my_scheme" android:host="my_app_host.com" />
</intent-filter>
</activity>
I don't think this is exactly the cause of your problem, but I got this same error "You do not have permission to open this page" and it was because I was using a scheme with a capital letter. eg "Celly" instead of "celly". This worked fine in the emulator but failed on real devices. Changing it all to lowercase fixed it.
According to the common tasks that should be:
<scheme android:name="braindump" />

Categories

Resources