Set default activity, execute before main Activity

684 views Asked by At

I want to make register_activity is first run if application open. But, still MainActivity run first. Can anybody help me to fix this.

This is my Manifest :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.client18.dd">
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <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/Theme.AppCompat.DayNight.NoActionBar">

        <activity android:name=".register_activity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".signup_activity">
        </activity>
        <activity android:name=".MainActivity">
        </activity>

    </application>

</manifest>
1

There are 1 answers

0
Umanda On

When I see your Manifest file I can not see any faults. I suggest to do followings.

1) Uninstall app in emulator / device if its exists, and then run application.

or

2) Rebuild project with cleaning ( Build > Clean Project )

P.S.

If you could practice signup_activity > SignupActivity it is nice and best practice.