Compare Revisions
Last modification
- Rev 17 2011-01-26 21:08:16
- Author: PointedEars
- Log message:
- Currencies:
+ Added/updated resource strings
+ Disabled "Quit" (options menu button)
- Added update notifications
- Added exchange rates update service (project requirement)
- Clean-up:
+ Outsourced conversion data
+ Layout: Replaced deprecated fill_parent with match_parent
/trunk/src/de/pointedears/converter/helpers/UpdateService.java |
File deleted |
|
Property changes: |
Deleted: svn:mime-type |
## -1 +0,0 ## |
-text/plain |
\ No newline at end of property |
Index: Notifier.java |
=================================================================== |
--- Notifier.java (revision 17) |
+++ Notifier.java (nonexistent) |
@@ -1,96 +0,0 @@ |
-/** |
- * A simple notifier for Activities, encapsulating all the work necessary |
- * to send a notification message on Android. |
- */ |
-package de.pointedears.converter.helpers; |
- |
-import android.app.Activity; |
-import android.app.Notification; |
-import android.app.NotificationManager; |
-import android.app.PendingIntent; |
-import android.content.Context; |
-import android.content.Intent; |
-import de.pointedears.converter.R; |
-import de.pointedears.converter.R.drawable; |
- |
-/** |
- * Sends notification messages for {@link Activity Activities} |
- * |
- * @author Thomas 'PointedEars' Lahn |
- */ |
-public class Notifier |
-{ |
- private static int nextId = 1; |
- |
- /** |
- * |
- */ |
- public Context activityContext; |
- |
- /** |
- * @param activityContext |
- * The activity for which a notification will be sent. This |
- * allows the user to select the notification and go back |
- * directly to the activity that issued it. |
- * @param tickerText |
- * The text to be displayed as notification, both as ticker message |
- * and in the notification list. |
- * @param notificationTitle |
- * The title for the notification message. The default ( |
- * <code>null</code>) |
- * is the application name (R.strings.app_name). |
- * @see Notifier#sendMessage(Context, CharSequence) |
- */ |
- public static void sendMessage(Context activityContext, |
- CharSequence tickerText, CharSequence notificationTitle) |
- { |
- NotificationManager mNotificationManager = |
- (NotificationManager) activityContext |
- .getSystemService(Context.NOTIFICATION_SERVICE); |
- |
- Notification notification = |
- new Notification(drawable.icon, tickerText, System.currentTimeMillis()); |
- |
- Context applicationContext = |
- activityContext.getApplicationContext(); |
- |
- Intent notificationIntent = |
- new Intent(activityContext, activityContext.getClass()); |
- |
- PendingIntent contentIntent = |
- PendingIntent.getActivity(activityContext, 0, |
- notificationIntent, 0); |
- |
- if (notificationTitle == null) |
- { |
- notificationTitle = activityContext.getString(R.string.app_name); |
- } |
- |
- CharSequence contentTitle = notificationTitle; |
- CharSequence contentText = tickerText; |
- |
- notification.setLatestEventInfo(applicationContext, contentTitle, |
- contentText, |
- contentIntent); |
- |
- mNotificationManager.notify(Notifier.nextId, notification); |
- ++Notifier.nextId; |
- } |
- |
- /** |
- * Sends a notification message where the the application name |
- * (R.strings.app_name) |
- * is used as message title. |
- * |
- * @param activityContext |
- * The activity for which a notification will be sent |
- * @param tickerText |
- * The text to be displayed as notification |
- * @see Notifier#sendMessage(Context, CharSequence, CharSequence) |
- */ |
- public static void sendMessage(Context activityContext, |
- CharSequence tickerText) |
- { |
- Notifier.sendMessage(activityContext, tickerText, null); |
- } |
-} |
\ No newline at end of file |
/Notifier.java |
Property changes: |
Deleted: svn:mime-type |
## -1 +0,0 ## |
-text/plain |
\ No newline at end of property |