Moving Bitmessage context into a foreground service (work in progress)
This commit is contained in:
@ -25,9 +25,9 @@ public class NetworkNotification extends AbstractNotification {
|
||||
private final BitmessageContext bmc;
|
||||
private NotificationCompat.Builder builder;
|
||||
|
||||
public NetworkNotification(Context ctx) {
|
||||
super(ctx);
|
||||
bmc = Singleton.getBitmessageContext(ctx);
|
||||
public NetworkNotification(Context ctx, BitmessageContext bmc) {
|
||||
super(ctx.getApplicationContext());
|
||||
this.bmc = bmc;
|
||||
builder = new NotificationCompat.Builder(ctx);
|
||||
builder.setSmallIcon(R.drawable.ic_notification_full_node)
|
||||
.setContentTitle(ctx.getString(R.string.bitmessage_full_node))
|
||||
|
@ -21,6 +21,7 @@ import ch.dissem.bitmessage.entity.Plaintext;
|
||||
import static ch.dissem.apps.abit.util.Drawables.toBitmap;
|
||||
|
||||
public class NewMessageNotification extends AbstractNotification {
|
||||
public static final int NEW_MESSAGE_NOTIFICATION_ID = 1;
|
||||
private static final StyleSpan SPAN_EMPHASIS = new StyleSpan(Typeface.BOLD);
|
||||
|
||||
public NewMessageNotification(Context ctx) {
|
||||
@ -76,6 +77,6 @@ public class NewMessageNotification extends AbstractNotification {
|
||||
|
||||
@Override
|
||||
protected int getNotificationId() {
|
||||
return 1;
|
||||
return NEW_MESSAGE_NOTIFICATION_ID;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user