- Fix flag in My Tracks notification to update the previous notification.

- move chart settings above settings
- remove My Tracks Importer, thus just using My Tracks
- rename to Save all to SD card...
- rename to Import from SD card
This commit is contained in:
Jimmy Shih
2012-04-27 13:24:00 -07:00
parent 1a23ba673c
commit 20eec8d30a
14 changed files with 111 additions and 124 deletions
+1 -2
View File
@@ -138,12 +138,10 @@ limitations under the License.
<activity <activity
android:label="@string/menu_aggregated_statistics" android:label="@string/menu_aggregated_statistics"
android:name="com.google.android.apps.mytracks.AggregatedStatsActivity" /> android:name="com.google.android.apps.mytracks.AggregatedStatsActivity" />
<activity android:name="com.google.android.apps.mytracks.ExportActivity" />
<activity <activity
android:label="@string/menu_help" android:label="@string/menu_help"
android:name="com.google.android.apps.mytracks.HelpActivity" /> android:name="com.google.android.apps.mytracks.HelpActivity" />
<activity <activity
android:label="@string/my_tracks_importer"
android:name="com.google.android.apps.mytracks.ImportActivity" > android:name="com.google.android.apps.mytracks.ImportActivity" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.ATTACH_DATA" /> <action android:name="android.intent.action.ATTACH_DATA" />
@@ -168,6 +166,7 @@ limitations under the License.
android:name="android.app.default_searchable" android:name="android.app.default_searchable"
android:value="com.google.android.apps.mytracks.SearchListActivity" /> android:value="com.google.android.apps.mytracks.SearchListActivity" />
</activity> </activity>
<activity android:name="com.google.android.apps.mytracks.SaveAllActivity" />
<activity <activity
android:launchMode="singleTop" android:launchMode="singleTop"
android:name="com.google.android.apps.mytracks.SearchListActivity" > android:name="com.google.android.apps.mytracks.SearchListActivity" >

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

+4 -4
View File
@@ -84,14 +84,14 @@ limitations under the License.
android:icon="@drawable/menu_satellite_mode" android:icon="@drawable/menu_satellite_mode"
android:id="@+id/track_detail_satellite_mode" android:id="@+id/track_detail_satellite_mode"
android:title="@string/menu_satellite_mode"/> android:title="@string/menu_satellite_mode"/>
<item
android:icon="@drawable/menu_chart_settings"
android:id="@+id/track_detail_chart_settings"
android:title="@string/menu_chart_settings"/>
<item <item
android:icon="@drawable/menu_sensor_state" android:icon="@drawable/menu_sensor_state"
android:id="@+id/track_detail_sensor_state" android:id="@+id/track_detail_sensor_state"
android:title="@string/menu_sensor_state"/> android:title="@string/menu_sensor_state"/>
<item
android:icon="@drawable/menu_chart_settings"
android:id="@+id/track_detail_chart_settings"
android:title="@string/menu_chart_settings"/>
<item <item
android:icon="@drawable/menu_settings" android:icon="@drawable/menu_settings"
android:id="@+id/track_detail_settings" android:id="@+id/track_detail_settings"
+10 -10
View File
@@ -32,18 +32,18 @@ limitations under the License.
android:showAsAction="always|collapseActionView" android:showAsAction="always|collapseActionView"
android:title="@string/menu_search"/> android:title="@string/menu_search"/>
<item <item
android:icon="@drawable/menu_import_all" android:icon="@drawable/menu_import"
android:id="@+id/track_list_import_all" android:id="@+id/track_list_import"
android:title="@string/menu_import_all"/> android:title="@string/menu_import"/>
<item <item
android:icon="@drawable/menu_export_all" android:icon="@drawable/menu_save_all"
android:id="@+id/track_list_export_all" android:id="@+id/track_list_save_all"
android:title="@string/menu_export_all"> android:title="@string/menu_save_all">
<menu> <menu>
<item android:id="@+id/track_list_export_gpx"/> <item android:id="@+id/track_list_save_all_gpx"/>
<item android:id="@+id/track_list_export_kml"/> <item android:id="@+id/track_list_save_all_kml"/>
<item android:id="@+id/track_list_export_csv"/> <item android:id="@+id/track_list_save_all_csv"/>
<item android:id="@+id/track_list_export_tcx"/> <item android:id="@+id/track_list_save_all_tcx"/>
</menu> </menu>
</item> </item>
<item <item
+26 -38
View File
@@ -637,22 +637,6 @@ limitations under the License.
Terms of Service Terms of Service
</string> </string>
<!-- Export -->
<string name="export_error"
translation_description="When exporting all the tracks to the SD card, a toast message
indicating error.">
Unable to export.
</string>
<string name="export_progress_message"
translation_description="When exporting all the tracks to the SD card, the progress message.">
Exporting all tracks...
</string>
<string name="export_success"
translation_description="When exporting all the tracks to the SD card, a toast message
indicating success.">
Export finished.
</string>
<!-- Generic Strings --> <!-- Generic Strings -->
<string name="generic_add" <string name="generic_add"
translation_description="The text on a button to say add."> translation_description="The text on a button to say add.">
@@ -1066,25 +1050,13 @@ limitations under the License.
translation_description="In the menu, to edit a track or a marker."> translation_description="In the menu, to edit a track or a marker.">
Edit Edit
</string> </string>
<string name="menu_export_all"
translation_description="In the menu, to export all the tracks to the SD card. This menu item
has a submenu.">
Export all...
</string>
<string name="menu_export_all_format"
translation_description="Under the 'Export all' menu option, the option to export all tracks as
a certain file format.
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'.">
Export as %1$s
</string>
<string name="menu_help" <string name="menu_help"
translation_description="In the menu, to go to the help page."> translation_description="In the menu, to go to the help page.">
Help Help
</string> </string>
<string name="menu_import_all" <string name="menu_import"
translation_description="In the menu, to import all the tracks from the SD card."> translation_description="In the menu, to import tracks from the SD card.">
Import all Import from SD card
</string> </string>
<string name="menu_insert_marker" <string name="menu_insert_marker"
translation_description="In the menu, to insert a marker."> translation_description="In the menu, to insert a marker.">
@@ -1119,12 +1091,17 @@ limitations under the License.
submenu."> submenu.">
Save to SD card... Save to SD card...
</string> </string>
<string name="menu_save_all"
translation_description="In the menu, to save all the tracks to the SD card. This menu item has
a submenu.">
Save all to SD card...
</string>
<string name="menu_save_format" <string name="menu_save_format"
translation_description="Under the 'Save to SD card...' menu option, the option to save a track translation_description="Under the save to SD card menu option, the option to save a track
as a certain file format. as a certain file format.
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'."> %1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'.">
As a %1$s file Save as %1$s
</string> </string>
<string name="menu_search" <string name="menu_search"
translation_description="In the menu, to start a textual search for tracks or waypoints."> translation_description="In the menu, to start a textual search for tracks or waypoints.">
@@ -1191,11 +1168,6 @@ limitations under the License.
translation_description="The My Tracks application name."> translation_description="The My Tracks application name.">
My Tracks My Tracks
</string> </string>
<string name="my_tracks_importer"
translation_description="When opening a GPX file from a file manager, the name of the My Tracks
application that can import the file to My Tracks.">
My Tracks Importer
</string>
<string name="my_tracks_recording_service" <string name="my_tracks_recording_service"
translation_description="When viewing the 'Running services' on Android, the name of the My translation_description="When viewing the 'Running services' on Android, the name of the My
Tracks service that is recording a track in the background. Tracks service that is recording a track in the background.
@@ -1253,6 +1225,22 @@ limitations under the License.
Preferred Units Preferred Units
</string> </string>
<!-- Save All -->
<string name="save_all_error"
translation_description="When saving all the tracks to the SD card, a toast message indicating
error.">
Unable to save.
</string>
<string name="save_all_progress_message"
translation_description="When saving all the tracks to the SD card, the progress message.">
Saving all tracks...
</string>
<string name="save_all_success"
translation_description="When saving all the tracks to the SD card, a toast message indicating
success.">
Save finished.
</string>
<!-- SD Card --> <!-- SD Card -->
<string name="sd_card_canceled" <string name="sd_card_canceled"
translation_description="When exporting a track to the SD card, a message indicating that the translation_description="When exporting a track to the SD card, a message indicating that the
@@ -28,17 +28,17 @@ import android.os.Bundle;
import android.widget.Toast; import android.widget.Toast;
/** /**
* An activity to export all the tracks to the SD card. * An activity to save all the tracks to the SD card.
* *
* @author Sandor Dornbush * @author Sandor Dornbush
*/ */
public class ExportActivity extends Activity { public class SaveAllActivity extends Activity {
public static final String EXTRA_TRACK_FILE_FORMAT = "track_file_format"; public static final String EXTRA_TRACK_FILE_FORMAT = "track_file_format";
private static final int DIALOG_PROGRESS_ID = 0; private static final int DIALOG_PROGRESS_ID = 0;
private ExportAsyncTask exportAsyncTask; private SaveAllAsyncTask saveAllAsyncTask;
private ProgressDialog progressDialog; private ProgressDialog progressDialog;
@Override @Override
@@ -46,22 +46,22 @@ public class ExportActivity extends Activity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
Object retained = getLastNonConfigurationInstance(); Object retained = getLastNonConfigurationInstance();
if (retained instanceof ExportAsyncTask) { if (retained instanceof SaveAllAsyncTask) {
exportAsyncTask = (ExportAsyncTask) retained; saveAllAsyncTask = (SaveAllAsyncTask) retained;
exportAsyncTask.setActivity(this); saveAllAsyncTask.setActivity(this);
} else { } else {
Intent intent = getIntent(); Intent intent = getIntent();
TrackFileFormat trackFileFormat = intent.getParcelableExtra(EXTRA_TRACK_FILE_FORMAT); TrackFileFormat trackFileFormat = intent.getParcelableExtra(EXTRA_TRACK_FILE_FORMAT);
exportAsyncTask = new ExportAsyncTask(this, trackFileFormat); saveAllAsyncTask = new SaveAllAsyncTask(this, trackFileFormat);
exportAsyncTask.execute(); saveAllAsyncTask.execute();
} }
} }
@Override @Override
public Object onRetainNonConfigurationInstance() { public Object onRetainNonConfigurationInstance() {
exportAsyncTask.setActivity(null); saveAllAsyncTask.setActivity(null);
return exportAsyncTask; return saveAllAsyncTask;
} }
@Override @Override
@@ -70,10 +70,10 @@ public class ExportActivity extends Activity {
return null; return null;
} }
progressDialog = DialogUtils.createHorizontalProgressDialog( progressDialog = DialogUtils.createHorizontalProgressDialog(
this, R.string.export_progress_message, new DialogInterface.OnCancelListener() { this, R.string.save_all_progress_message, new DialogInterface.OnCancelListener() {
@Override @Override
public void onCancel(DialogInterface dialog) { public void onCancel(DialogInterface dialog) {
exportAsyncTask.cancel(true); saveAllAsyncTask.cancel(true);
finish(); finish();
} }
}); });
@@ -102,7 +102,7 @@ public class ExportActivity extends Activity {
/** /**
* Sets the progress dialog value. * Sets the progress dialog value.
* *
* @param number the number of tracks exported * @param number the number of tracks saved
* @param max the maximum number of tracks * @param max the maximum number of tracks
*/ */
public void setProgressDialogValue(int number, int max) { public void setProgressDialogValue(int number, int max) {
@@ -31,13 +31,13 @@ import android.os.AsyncTask;
import android.os.PowerManager.WakeLock; import android.os.PowerManager.WakeLock;
/** /**
* AsyncTask to export all the tracks to the SD card. * AsyncTask to save all the tracks to the SD card.
* *
* @author Jimmy Shih * @author Jimmy Shih
*/ */
public class ExportAsyncTask extends AsyncTask<Void, Integer, Boolean> { public class SaveAllAsyncTask extends AsyncTask<Void, Integer, Boolean> {
private ExportActivity exportActivity; private SaveAllActivity saveAllActivity;
private final TrackFileFormat trackFileFormat; private final TrackFileFormat trackFileFormat;
private final Context context; private final Context context;
private final MyTracksProviderUtils myTracksProviderUtils; private final MyTracksProviderUtils myTracksProviderUtils;
@@ -56,40 +56,40 @@ public class ExportAsyncTask extends AsyncTask<Void, Integer, Boolean> {
/** /**
* Creates an AsyncTask. * Creates an AsyncTask.
* *
* @param exportActivity the activity currently associated with this AsyncTask * @param saveAllActivity the activity currently associated with this AsyncTask
* @param trackFileFormat the track file format * @param trackFileFormat the track file format
*/ */
public ExportAsyncTask(ExportActivity exportActivity, TrackFileFormat trackFileFormat) { public SaveAllAsyncTask(SaveAllActivity saveAllActivity, TrackFileFormat trackFileFormat) {
this.exportActivity = exportActivity; this.saveAllActivity = saveAllActivity;
this.trackFileFormat = trackFileFormat; this.trackFileFormat = trackFileFormat;
context = exportActivity.getApplicationContext(); context = saveAllActivity.getApplicationContext();
myTracksProviderUtils = MyTracksProviderUtils.Factory.get(exportActivity); myTracksProviderUtils = MyTracksProviderUtils.Factory.get(saveAllActivity);
// Get the wake lock if not recording // Get the wake lock if not recording
if (PreferencesUtils.getRecordingTrackId(exportActivity) == -1L) { if (PreferencesUtils.getRecordingTrackId(saveAllActivity) == -1L) {
wakeLock = SystemUtils.acquireWakeLock(exportActivity, wakeLock); wakeLock = SystemUtils.acquireWakeLock(saveAllActivity, wakeLock);
} }
success = false; success = false;
completed = false; completed = false;
messageId = R.string.export_error; messageId = R.string.save_all_error;
} }
/** /**
* Sets the current {@link ExportActivity} associated with this AyncTask. * Sets the current {@link SaveAllActivity} associated with this AyncTask.
* *
* @param exportActivity the current {@link ExportActivity}, can be null * @param saveAllActivity the current {@link SaveAllActivity}, can be null
*/ */
public void setActivity(ExportActivity exportActivity) { public void setActivity(SaveAllActivity saveAllActivity) {
this.exportActivity = exportActivity; this.saveAllActivity = saveAllActivity;
if (completed && exportActivity != null) { if (completed && saveAllActivity != null) {
exportActivity.onAsyncTaskCompleted(success, messageId); saveAllActivity.onAsyncTaskCompleted(success, messageId);
} }
} }
@Override @Override
protected void onPreExecute() { protected void onPreExecute() {
if (exportActivity != null) { if (saveAllActivity != null) {
exportActivity.showProgressDialog(); saveAllActivity.showProgressDialog();
} }
} }
@@ -99,7 +99,7 @@ public class ExportAsyncTask extends AsyncTask<Void, Integer, Boolean> {
try { try {
cursor = myTracksProviderUtils.getTracksCursor(null, null, TracksColumns._ID); cursor = myTracksProviderUtils.getTracksCursor(null, null, TracksColumns._ID);
if (cursor == null) { if (cursor == null) {
messageId = R.string.export_success; messageId = R.string.save_all_success;
return true; return true;
} }
int count = cursor.getCount(); int count = cursor.getCount();
@@ -123,7 +123,7 @@ public class ExportAsyncTask extends AsyncTask<Void, Integer, Boolean> {
} }
publishProgress(i + 1, count); publishProgress(i + 1, count);
} }
messageId = R.string.export_success; messageId = R.string.save_all_success;
return true; return true;
} finally { } finally {
if (cursor != null) { if (cursor != null) {
@@ -138,8 +138,8 @@ public class ExportAsyncTask extends AsyncTask<Void, Integer, Boolean> {
@Override @Override
protected void onProgressUpdate(Integer... values) { protected void onProgressUpdate(Integer... values) {
if (exportActivity != null) { if (saveAllActivity != null) {
exportActivity.setProgressDialogValue(values[0], values[1]); saveAllActivity.setProgressDialogValue(values[0], values[1]);
} }
} }
@@ -147,8 +147,8 @@ public class ExportAsyncTask extends AsyncTask<Void, Integer, Boolean> {
protected void onPostExecute(Boolean result) { protected void onPostExecute(Boolean result) {
success = result; success = result;
completed = true; completed = true;
if (exportActivity != null) { if (saveAllActivity != null) {
exportActivity.onAsyncTaskCompleted(success, messageId); saveAllActivity.onAsyncTaskCompleted(success, messageId);
} }
} }
@@ -159,8 +159,8 @@ public class TrackListActivity extends FragmentActivity {
private MenuItem recordTrackMenuItem; private MenuItem recordTrackMenuItem;
private MenuItem stopRecordingMenuItem; private MenuItem stopRecordingMenuItem;
private MenuItem searchMenuItem; private MenuItem searchMenuItem;
private MenuItem importAllMenuItem; private MenuItem importMenuItem;
private MenuItem exportAllMenuItem; private MenuItem saveAllMenuItem;
private MenuItem deleteAllMenuItem; private MenuItem deleteAllMenuItem;
@Override @Override
@@ -319,20 +319,20 @@ public class TrackListActivity extends FragmentActivity {
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.track_list, menu); getMenuInflater().inflate(R.menu.track_list, menu);
String fileTypes[] = getResources().getStringArray(R.array.file_types); String fileTypes[] = getResources().getStringArray(R.array.file_types);
menu.findItem(R.id.track_list_export_gpx) menu.findItem(R.id.track_list_save_all_gpx)
.setTitle(getString(R.string.menu_export_all_format, fileTypes[0])); .setTitle(getString(R.string.menu_save_format, fileTypes[0]));
menu.findItem(R.id.track_list_export_kml) menu.findItem(R.id.track_list_save_all_kml)
.setTitle(getString(R.string.menu_export_all_format, fileTypes[1])); .setTitle(getString(R.string.menu_save_format, fileTypes[1]));
menu.findItem(R.id.track_list_export_csv) menu.findItem(R.id.track_list_save_all_csv)
.setTitle(getString(R.string.menu_export_all_format, fileTypes[2])); .setTitle(getString(R.string.menu_save_format, fileTypes[2]));
menu.findItem(R.id.track_list_export_tcx) menu.findItem(R.id.track_list_save_all_tcx)
.setTitle(getString(R.string.menu_export_all_format, fileTypes[3])); .setTitle(getString(R.string.menu_save_format, fileTypes[3]));
recordTrackMenuItem = menu.findItem(R.id.track_list_record_track); recordTrackMenuItem = menu.findItem(R.id.track_list_record_track);
stopRecordingMenuItem = menu.findItem(R.id.track_list_stop_recording); stopRecordingMenuItem = menu.findItem(R.id.track_list_stop_recording);
searchMenuItem = menu.findItem(R.id.track_list_search); searchMenuItem = menu.findItem(R.id.track_list_search);
importAllMenuItem = menu.findItem(R.id.track_list_import_all); importMenuItem = menu.findItem(R.id.track_list_import);
exportAllMenuItem = menu.findItem(R.id.track_list_export_all); saveAllMenuItem = menu.findItem(R.id.track_list_save_all);
deleteAllMenuItem = menu.findItem(R.id.track_list_delete_all); deleteAllMenuItem = menu.findItem(R.id.track_list_delete_all);
ApiAdapterFactory.getApiAdapter().configureSearchWidget(this, searchMenuItem); ApiAdapterFactory.getApiAdapter().configureSearchWidget(this, searchMenuItem);
@@ -360,11 +360,11 @@ public class TrackListActivity extends FragmentActivity {
if (stopRecordingMenuItem != null) { if (stopRecordingMenuItem != null) {
stopRecordingMenuItem.setVisible(isRecording); stopRecordingMenuItem.setVisible(isRecording);
} }
if (importAllMenuItem != null) { if (importMenuItem != null) {
importAllMenuItem.setVisible(!isRecording); importMenuItem.setVisible(!isRecording);
} }
if (exportAllMenuItem != null) { if (saveAllMenuItem != null) {
exportAllMenuItem.setVisible(!isRecording); saveAllMenuItem.setVisible(!isRecording);
} }
if (deleteAllMenuItem != null) { if (deleteAllMenuItem != null) {
deleteAllMenuItem.setVisible(!isRecording); deleteAllMenuItem.setVisible(!isRecording);
@@ -385,29 +385,29 @@ public class TrackListActivity extends FragmentActivity {
return true; return true;
case R.id.track_list_search: case R.id.track_list_search:
return ApiAdapterFactory.getApiAdapter().handleSearchMenuSelection(this); return ApiAdapterFactory.getApiAdapter().handleSearchMenuSelection(this);
case R.id.track_list_import_all: case R.id.track_list_import:
intent = IntentUtils.newIntent(this, ImportActivity.class) intent = IntentUtils.newIntent(this, ImportActivity.class)
.putExtra(ImportActivity.EXTRA_IMPORT_ALL, true); .putExtra(ImportActivity.EXTRA_IMPORT_ALL, true);
startActivity(intent); startActivity(intent);
return true; return true;
case R.id.track_list_export_gpx: case R.id.track_list_save_all_gpx:
intent = IntentUtils.newIntent(this, ExportActivity.class) intent = IntentUtils.newIntent(this, SaveAllActivity.class)
.putExtra(ExportActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.GPX); .putExtra(SaveAllActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.GPX);
startActivity(intent); startActivity(intent);
return true; return true;
case R.id.track_list_export_kml: case R.id.track_list_save_all_kml:
intent = IntentUtils.newIntent(this, ExportActivity.class) intent = IntentUtils.newIntent(this, SaveAllActivity.class)
.putExtra(ExportActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.KML); .putExtra(SaveAllActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.KML);
startActivity(intent); startActivity(intent);
return true; return true;
case R.id.track_list_export_csv: case R.id.track_list_save_all_csv:
intent = IntentUtils.newIntent(this, ExportActivity.class) intent = IntentUtils.newIntent(this, SaveAllActivity.class)
.putExtra(ExportActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.CSV); .putExtra(SaveAllActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.CSV);
startActivity(intent); startActivity(intent);
return true; return true;
case R.id.track_list_export_tcx: case R.id.track_list_save_all_tcx:
intent = IntentUtils.newIntent(this, ExportActivity.class) intent = IntentUtils.newIntent(this, SaveAllActivity.class)
.putExtra(ExportActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.TCX); .putExtra(SaveAllActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.TCX);
startActivity(intent); startActivity(intent);
return true; return true;
case R.id.track_list_delete_all: case R.id.track_list_delete_all:
@@ -486,11 +486,11 @@ public class TrackRecordingService extends Service {
private void showNotification() { private void showNotification() {
if (isRecording) { if (isRecording) {
Notification notification = new Notification( Notification notification = new Notification(
R.drawable.my_tracks_notification_icon, null /* tickerText */, R.drawable.my_tracks_notification_icon, null, System.currentTimeMillis());
System.currentTimeMillis());
Intent intent = IntentUtils.newIntent(this, TrackDetailActivity.class) Intent intent = IntentUtils.newIntent(this, TrackDetailActivity.class)
.putExtra(TrackDetailActivity.EXTRA_TRACK_ID, recordingTrackId); .putExtra(TrackDetailActivity.EXTRA_TRACK_ID, recordingTrackId);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, 0); PendingIntent contentIntent = PendingIntent.getActivity(
this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
notification.setLatestEventInfo(this, getString(R.string.my_tracks_app_name), notification.setLatestEventInfo(this, getString(R.string.my_tracks_app_name),
getString(R.string.track_record_notification), contentIntent); getString(R.string.track_record_notification), contentIntent);
notification.flags += Notification.FLAG_NO_CLEAR; notification.flags += Notification.FLAG_NO_CLEAR;