Android : what category of intent filter should i use -


in second , third activity, in intent filter should use in category.in second activity used default after making third activity not know category should use. first android app trying make.please me,which categoty should use in second , third activity.

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="csimplifyit.mobileapp.myschool">  <!-- auto-complete email text field in login form user's emails --> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="android.permission.read_profile" /> <uses-permission android:name="android.permission.read_contacts" />  <!-- json call --> <uses-permission android:name="android.permission.internet" />  <application     android:allowbackup="true"     android:icon="@mipmap/login"     android:label="@string/app_name"     android:supportsrtl="true"     android:theme="@style/apptheme">     <activity         android:name=".login.login"         android:label="@string/app_name">         <intent-filter>             <action android:name="android.intent.action.main" />              <category android:name="android.intent.category.launcher" />         </intent-filter>     </activity>      <activity         android:name=".login.menu"         android:label="@string/second_activity">         <intent-filter>             <action android:name="csimplifyit.mobileapp.myschool.login.menu" />              <category android:name="android.intent.category.       " />         </intent-filter>     </activity>      <activity         android:name=".login.attendance"         android:label="@string/attendance_activity">         <intent-filter>             <action android:name="csimplifyit.mobileapp.myschool.login.attendance" />              <category android:name="android.intent.category.       " />         </intent-filter>     </activity>  </application> 

most likely, rid of second , third <intent-filter> elements entirely. have <intent-filter> elements on activities expect other apps link to. not need action strings starting own activities -- can use explicit intents (e.g., new intent(this, csimplifyit.mobileapp.myschool.login.menu.class)).

if, reason, expecting other developers directly start menu or attendance activities, simplest thing put them in default category well. call startactivity() automatically adds default category intent, if intent has not specified category.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -