-5

`

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

<application
    android:allowBackup="true"
    android:icon="@drawable/logo"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".MainActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".WelcomeActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".ReservedTableActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".WaitingListActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".ReservationActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".InvoiceViewActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".ForReservedUserActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".ToInvoiceActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".MenuActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".PushActivity"
        android:label=""
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".CustomPrintActivity"
        android:label="@string/title_activity_custom_print"
        android:theme="@style/AppTheme.NoActionBar"/>

    <receiver android:name=".MyReceiver">

        <intent-filter>
            <action android:name="com.myapp.rms.CUSTOM_INTENT">
            </action>
        </intent-filter>

    </receiver>
</application>

`In My android app when i am launching my app from android studio to bluestack it is working fine as it is launching the activity which i set as launcher but the problem is when i am closing app and reopening by clicking the icon(Not from android studio), this is launching another activity. as in my menifest i have set MainActivity as launcher but this is opening PushActivity when i am reopening app.Actually I set PushActivity as launcher once but now i have set MainActivity as launcher.but this is not launching MainActivity

2 Answers2

0

I had the same problem when i was using bluestack. Not sure what the problem is but i solved it by uninstalling the app in bluestack and then installing it again from android studio.

M.Waqas Pervez
  • 2,492
  • 2
  • 19
  • 33
0

Use this tag in your launcher activity declaration.

<intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Nikita Shah
  • 156
  • 10