0

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>
Denny Kurniawan
  • 168
  • 1
  • 3
  • 21
  • 2
    basing from your `AndroidManifest`, `register_activity` should be called first. Did you happen to interchange your layouts? – Rick Royd Aban Dec 29 '16 at 02:46
  • Post some of the register activity. At least the `onCreate()`. Maybe you are doing something funky there – codeMagic Dec 29 '16 at 02:48
  • 1
    Maybe you should also follow Java naming conventions. Since it is a class, should you call it as RegisterActivity instead of register_activity? – Rick Royd Aban Dec 29 '16 at 02:49

1 Answers1

0

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.

Umanda
  • 4,737
  • 3
  • 23
  • 28