How to find the Default Activity Class Name? - android

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.

Related

Apps targeting Android 12 and higher are required to specify an explicit value for

Error:
Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined.
manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.will_dev.vpn_app">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="com.android.vending.BILLING" />
<application
android:name="com.will_dev.vpn_app.YouApplication"
android:hardwareAccelerated="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:roundIcon="#drawable/logo"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="com.will_dev.vpn_app.view.MainActivity"
/>
<activity
android:name="com.will_dev.vpn_app.view.IntroActivity"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Login"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.TDView"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.EnterReferenceCode"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.RewardPointClaim"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Verification"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Spinner"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.AboutUs"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.ContactUs"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.PrivacyPolice"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Faq"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.EarnPoint"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.ForgetPassword"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Register"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.SplashScreen"
/>
<activity
android:name="com.will_dev.vpn_app.view.Servers"
/>
<activity
android:exported="true"
android:name="com.will_dev.vpn_app.fromanother.activity.WelcomeActivity"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="de.blinkt.openvpn.DisconnectVPNActivity"
android:excludeFromRecents="true"
android:noHistory="true"
android:taskAffinity=".DisconnectVPN"
android:theme="#style/blinkt.dialog" />
<service
android:name="de.blinkt.openvpn.core.OpenVPNService"
android:exported="true"
android:permission="android.permission.BIND_VPN_SERVICE">
<intent-filter>
<action android:name="android.net.VpnService" />
</intent-filter>
</service>
<activity
android:name="com.will_dev.vpn_app.view.PurchaseActivity"
/>
<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" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:exported="true"
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>
i have added exported=true to launcher activity but still it failing
Try add android: exported to all of your activities if you are targeting android 12. Even if you don't want to export it add android: export = "false".
This issue can be with external libraries. Just wait when libraries will be updated or delete these libraries from project. Or you can try search in project and find which library uses intent. And use manifest merge attribute to add exported to external library.
https://android-doc.github.io/tools/building/manifest-merge.html

When people install my app, they get two apps

When people install my app, they get two apps (same app, two icons). Here's my AndroidManifest.xml file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.test">
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET" />
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".SplashActivity"
android:theme="#style/AppTheme.SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SettingsActivity" />
<activity android:name=".HistoryActivity" />
<activity
android:name=".PaymentActivity"
android:screenOrientation="portrait" />
<activity
android:name=".PlayerActivity"
android:screenOrientation="portrait" />
<activity
android:name=".SearchActivity"
android:screenOrientation="portrait" />
<activity android:name=".VideoActivity" />
<activity
android:name=".FacebookActivity"
android:screenOrientation="portrait" />
<activity
android:name=".HomeActivity"
android:screenOrientation="portrait" />
<activity
android:name=".LibraryActivity"
android:screenOrientation="portrait" />
<activity
android:name=".LoginActivity"
android:screenOrientation="portrait" />
<activity
android:name=".BookDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name=".BookActivity"
android:screenOrientation="portrait" />
<activity
android:name=".CategoryActivity"
android:screenOrientation="portrait" />
<activity
android:name=".TextActivity"
android:screenOrientation="portrait" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<service android:name="com.beraldo.playerlib.PlayerService" />
<receiver
android:name=".LaunchPlayerBroadcastReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.beraldo.playerlib.LAUNCH_PLAYER_ACTIVITY" />
</intent-filter>
</receiver>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
</application>
</manifest>
Any help would be greatly appreciated.
You have:
<activity
android:name=".SplashActivity"
android:theme="#style/AppTheme.SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
and you have:
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Both have the <intent-filter> that says you want those activities to have icons in the launcher. If that is not what you want, remove the <intent-filter> from one of them.

Getting Error(Could not identify launch activity: Default Activity not found) While running project

i am getting this error while developing my app, every thing works fine suddenly this error happened while run the app and checking the changes, as i told everything works fine suddenly this happen i didn't change anything in Manifest.xml file., this is the manifest file kindly help me out.
this is the error i am getting
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.habitreminder">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<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=".OnboardingPackage.OnboardingSlider"
android:theme="#style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".userhome.UserDashboardActivity"
android:theme="#style/Theme.AppCompat.NoActionBar"
android:label="#string/title_activity_user_dashboard">
</activity>
<activity
android:name=".signup.UserCalenderSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".signup.UserMapSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".signup.UserDetailsSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".login.LoginActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".LoginSignup.LoginSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".MainActivity"
android:theme="#style/Theme.AppCompat.NoActionBar">
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCy-z3OoXACHh_MKBLoCPjdNo2ySD1ogU8" />
<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=".ProfileSettings.changeprofilename"
android:theme="#style/AppThemepopup"/>
</application>
</manifest>
Is your activity declared in ŮŽAndroidManifest like this ?
<activity
android:name=".launchactivity"
android:label="#string/title_activity_login"
android:windowSoftInputMode="stateHidden" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
enter image description here
I just close the Android Studio And delete 2 folders name caches and tmp and start the Android Studio again and it worked.

Permission not available in App settings

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>

Custom URI for android application

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>

Categories

Resources