I have 3 activity tasks A-B-C
<activity android:name=".LoginActivity"
android:label="@string/app_name"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".DashboardActivity"
android:label="@string/app_name" >
</activity>
<activity android:name=".CreateNewPolygonActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:alwaysRetainTaskState="true"
android:configChanges="orientation|keyboard|keyboardHidden">
</activity>
<service android:name=".services.RecordCircuitService"
android:enabled="true" >
</service>
And I have a Service
with GPS using LocationManager
.
My application has this logic:
- On launcher icon clicked - > start login activity
- After login - > login activity is finish(); and start dashboardActivity
- In the dashboard I start
CreateNewPolygonActivity
and start theService
with GPS - Press HOME (this is reorganize
RecordActivity
to foreground)
after I have some mistakes work
- open
CreateNewPolygonActivity
withonCreate
- open
DashboardActivity
I think I have a problem with my task organization.