I'd like to be able to open my Android app from a URL. So in the AndroidManifest.xml I put this code:
<application
android:allowBackup="true"
android:theme="#android:style/Theme.NoTitleBar"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
>
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="#string/apikey" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id" />
<activity
android:name="com.myApp.LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="uritest" android:host="com.myApp" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
But when I go into my browser on the phone and type in "uritest://com.myApp" in the URL bar, it Google searches it instead of opening the app like I would expect it to. Is there something that I'm doing incorrectly? Any help in this matter would be greatly appreciated, thanks!
Related
Whenever I bundle my app and upload it for internal testing it goes to an "App Info" screen instead of the main app. On some devices the app is completely hidden and doesn't even come up in a search.
Here's my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="REDACTED">
<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"
>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/admob_app_id"
/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="#string/facebook_client_token"/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:name="REDACTED.MainActivity"
android:label="#string/title_activity_main"
android:theme="#style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"
android:screenOrientation="landscape"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/custom_url_scheme" android:host="oauth" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths"></meta-data>
</provider>
</application>
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
The solution was converting this:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/custom_url_scheme" android:host="oauth" />
</intent-filter>
to this:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<intent-filter>
<data android:scheme="#string/custom_url_scheme" android:host="oauth" />
</intent-filter>
I have an app that I uploaded to the Google Play Store. It stops running once downloaded or can't be downloaded at all. I'm pretty sure there's something wrong with my manifest as that's the error. I'm going to add my app release apk and manifest file.
Asking if someone could help me find the issue, it shouldn't be a terrible error, but I can't seem to figure it out.
Thanks.
Manifest file below:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.Houston_Rockets_Team_App">
<uses-permission android:name="android.permission.INTERNET"/>
<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"
android:debuggable="false"
tools:ignore="HardcodedDebugMode">
<activity
android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.MainActivity"
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="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.PlayersActivity" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
<activity android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.StaffActivity" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
<activity android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.Settings" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
<activity android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.AboutActivity" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
<activity android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.EditPrefs" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
</application>
Here's the apk, I'm hoping it can be opened.
https://drive.google.com/file/d/18VT9Gl4adwBGuMa_omGWtjf0IM4Rc0RD/view?usp=sharing
-I found your bug and its mainActivity not found error raise.
-Please check your MainActivity path into the manifest and set right classpath into the manifest that will solve your error.
Why it can't show my app on the youtube share list?
The current effect in the below it can't show my app..
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<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>
</activity>
This is the code to make the effect or i am using a wrong way to do the effect?
<activity android:name=".AboutActivity">
<intent-filter>
<action android:name="android.intent.action.send"/>
<category android:name="android.intent.category.default"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
This is the other code
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login" />
<activity
android:name=".RegisterActivity"
android:label="#string/title_activity_register" />
<activity
android:name=".MoviePlayActivity"
android:label="#string/title_activity_movie_play" />
<activity
android:name=".QuestionUploadActivity"
android:label="#string/title_activity_question_upload" />
<activity
android:name=".PhotoUploadActivity"
android:label="#string/title_activity_photo_upload">
</activity>
</application>
i am using a wrong way to do the effect?
Android is case-sensitive. Replace:
<activity android:name=".AboutActivity">
<intent-filter>
<action android:name="android.intent.action.send"/>
<category android:name="android.intent.category.default"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
with:
<activity android:name=".AboutActivity">
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
I just published my first app and when I downloaded it, there is an uninstall button, No open button and no logo has been generated. i have tried looking it up online. But have not been able to find anything helpful. Please help.
`
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
<activity
android:name="com.phoenix.andaz.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/mp3"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
<activity android:name="com.phoenix.andaz.AK"
android:label="#string/app_name"
android:screenOrientation="portrait"> </activity>
<activity android:name="com.phoenix.andaz.SK"
android:label="#string/app_name"
android:screenOrientation="portrait"> </activity>
<activity android:name="com.phoenix.andaz.ShK"
android:label="#string/app_name"
android:screenOrientation="portrait"> </activity>
<activity android:name="com.phoenix.andaz.Player"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent">
</activity>
</application>
No app is going to know how to launch any of your activities. Most are private to your app, and MainActivity has a very broken <intent-filter>.
Here is my guess as to the manifest entry you should have for that activity:
<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.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/mp3"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
This says "either match MAIN/LAUNCHER or match SEND/DEFAULT/one of the MIME types".
Hi I'm making an android app for the first time and I am stuck I have made a main menu with buttons and I want it to go to another secondary menu for example console games gets clicked and then goes to the console menu view then from there click on the PlayStation button to get to Google maps. The problem is when I get to the console menu the buttons do nothing even when I have the onclicklistener method set to the right button. I have narrowed it down (I think) to the manifest where the problem is but I can't find what is wrong. Here is the whole code .Please Help thanks. :)
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:icon="#drawable/gf_icon"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar"
android:debuggable="true">
<uses-library android:name="com.google.android.maps" />
<!--splash screen-->
<activity
android:name=".myMain"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- main screen -->
<activity
android:name=".myMenu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.irou.geekfast.CLEARSCREEN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- console games menu -->
<activity
android:name=".consoleGames"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.irou.geekfast.CONSOLEGAMES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- console games menu -->
<activity
android:name=".consoleGames"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.irou.geekfast.CONSOLEGAMES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- hardware menu -->
<activity
android:name=".mainMenu"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.irou.geekfast.MAINMENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".helpBox"
android:label="#string/app_name"
android:theme="#android:style/Theme.Dialog">
<intent-filter>
<action android:name="com.irou.geekfast.HELPBOX" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Map activity -->
<activity
android:name=".consoleMap"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.irou.geekfast.CONSOLEMAP" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
From the information you have provided looks like you are missing Intent Filters
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>