I want to call the activity Tap In when an NFC Tag is tapped to my phone using URI Scheme. How can I define this in android manifest?... not to launch an app, but only open content in that app.
In data, how is host, path, and scheme defined and how should I write them?
I'm using a Samsung Galaxy S5 and NTAG216.
package="com.example.nani.mrt">
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature
android:name="android.hardware.nfc"
android:required="false" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainHome">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".TapIn">
<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:host=""
android:path=""
android:scheme="" />
<data android:scheme="" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity" />
<activity android:name=".NFCTourguide" />
<activity android:name=".Login">
<!--<intent-filter>-->
<!--<action android:name="android.intent.action.MAIN" />-->
<!--<category android:name="android.intent.category.LAUNCHER" />-->
<!--</intent-filter>-->
</activity>
<activity android:name=".ForgotPassword" />
<activity
android:name=".HomeNavigation"
android:label="#string/title_activity_home_navigation"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".StudentVerification" />
<activity android:name=".Normal" />
<activity android:name=".OKUVerification" />
<activity android:name=".SeniorVerification" />
</application>
Related
I have purchased this app from Codecanyon but the documentation is not so much clear. My question is how could I find the Default Activity Class Name?
This is my androidmanifest.xml file. I am unable to figure out the Launcher activity. I need this for FB login API integration.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
xmlns:tools="http://schemas.android.com/tools"
package="com.mehar.Consol">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.TYPE_SYSTEM_ALERT" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<dist:module dist:instant="true" />
<uses-permission android:name="android.permission.VIBRATE" />
<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:usesCleartextTraffic="true">
<activity android:name=".Presentation.ui.activities.impl.WalletActivity"></activity>
<activity android:name=".Presentation.ui.activities.impl.ProductDescriptionActivity" />
<activity android:name=".Presentation.ui.activities.impl.ResetPasswordActivity" />
<activity android:name=".Presentation.ui.activities.impl.MyBidsActivity" />
<activity android:name=".Presentation.ui.activities.impl.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Presentation.ui.activities.impl.ProductReviewActivity" />
<activity android:name=".Presentation.ui.activities.impl.AccountInfoActivity" />
<activity android:name=".Presentation.ui.activities.impl.StripePaymentActivity" />
<activity android:name=".Presentation.ui.activities.impl.SellerShopActivity" />
<activity android:name=".Presentation.ui.activities.impl.PaymentActivity" />
<activity android:name=".Presentation.ui.activities.impl.RegisterActivity" />
<activity android:name=".Presentation.ui.activities.impl.ShippingActivity" />
<activity android:name=".Presentation.ui.activities.impl.PurchaseHistoryDetailsActivity" />
<activity android:name=".Presentation.ui.activities.impl.PurchaseHistoryActivity" />
<activity android:name=".Presentation.ui.activities.impl.WishlistActivity" />
<activity android:name=".Presentation.ui.activities.impl.BuyingOptionsActivity" />
<activity android:name=".Presentation.ui.activities.impl.PolicyViewActivity" />
<activity android:name=".Presentation.ui.activities.impl.ProductDetailsActivity" />
<activity android:name=".Presentation.ui.activities.impl.SubCategoryActivity" />
<activity android:name=".Presentation.ui.activities.impl.ProductListingActivity" />
<activity
android:name=".Presentation.ui.activities.impl.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />
<activity android:name=".Presentation.ui.activities.impl.LoginActivity" />
<activity
android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<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="${applicationId}.braintree" />
</intent-filter>
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<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="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
</application>
</manifest>
Please help me by telling the Default Activity Class Name?
<activity android:name=".Presentation.ui.activities.impl.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The <activity></activity> tag that has this line:
<category android:name="android.intent.category.LAUNCHER" />
is your launcher activity, so it is SplashActivity. If you want to find what activity opens from this activity you need to check the code. Search for something like this:
Intent intent = new Intent(SplashActivity.this, OtherActivity.class;
startActivity(intent);
or
startActivity(new Intent(SplashActivity.this, OtherActivity.class));
There are many options to start a new activity but it should look like this. If you have any other questions just ask in the comments below.
I have declared storage permission in the manifest and try to seek user permission for SDK 23 and above. But, I found an issue, I cannot see the added permission in the app settings. I have never come across such situation. Let me know where am I doing wrong. Here are the screen shots.
Manifest File:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kinephonics">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera2.full" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<application
android:name=".ui.MyApplication"
android:allowBackup="true"
android:icon="#mipmap/app_icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/app_icon"
android:supportsRtl="true">
<activity
android:name=".ui.LoginActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<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="www.kinephonics.com"
android:scheme="http" />
</intent-filter>
</activity>
<activity
android:name=".ui.LandingPage"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".ui.SplashScreen"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.InformationActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".ui.PlayerActivity"
android:screenOrientation="landscape"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<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="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".QuizActivity"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name=".ui.AppBaseActivity"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".ui.VideoPlayList"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".ui.ActivityLog"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.LockedContentActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<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="com.kinephonics.braintree" />
</intent-filter>
</activity>
<activity
android:name=".ui.DictionaryActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="stateHidden" />
</application>
</manifest>
When I add the following code in the AndroidManifest the app is missing (disappears) from my device.
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="www.example.com"
android:pathPrefix="/gizmos"/>
</intent-filter>
If I don't add this code the app is installed and appears as it should be BUT I get warning:
App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter.
I already did research from official documentation and also this question but still my problem is different.
EDIT:
Here is all my manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="#mipmap/icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:screenOrientation="portrait">
<activity android:name=".MainActivity"
android:theme="#style/FullScreenTheme"
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" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="www.example.com"
android:pathPrefix="/gizmos"/>
</intent-filter>
<activity android:name=".AnimationScreenActivity"
android:theme="#style/FullScreenTheme"
android:screenOrientation="portrait"/>
</activity>
</application>
You are not closing your intent filter right
<activity android:name=".MainActivity"
android:theme="#style/FullScreenTheme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
After #Harisali help, the solution is to separate it in two <intent-filter> like this:
<activity android:name=".MainActivity"
android:theme="#style/FullScreenTheme"
android:screenOrientation="portrait">
<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="https"
android:host="www.example.com"
android:pathPrefix="/gizmos"/>
</intent-filter>
</activity>
Uninstall the app and run the code, sometimes the old package might be overwritten.
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>
My app used to work just fine, its icon displayed when installed in applications and it was uploaded to the Play Store. Now when I install it, it is like invisible, and in the Play Store it just says Uninstall, not open. What would be the reason for this?
Thanks.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="redacted" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:screenOrientation="portrait"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:hardwareAccelerated="true"
>
<activity
android:name=".aboutclass"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="redacted.aboutclass" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="redacted.MainActivity" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"/>
<data android:scheme="https"/>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
</application>
</manifest>
This problem occurs when you include the <data> element in the same intent-filter as your action.MAIN, which does not expect any data.
You could try splitting the intent-filter like this:
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
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="redacted.MainActivity" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"/>
<data android:scheme="https"/>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
See this previous answer.