[Interest] Qt Android App and Notifications - Black screen after tapping a notification with app open on background.

Nuno Santos nunosantos at imaginando.pt
Tue Aug 30 18:04:33 CEST 2016


None. Everything is done by Parse SDK. But in the snippet bellow I can override things.

> On 30 Aug 2016, at 17:03, Jason H <jhihn at gmx.com> wrote:
> 
> What code are you using to show your activity from the notification?
>  
> Sent: Tuesday, August 30, 2016 at 11:32 AM
> From: "Nuno Santos" <nunosantos at imaginando.pt>
> To: "Jason H" <jhihn at gmx.com>
> Cc: "Qt Project MailingList" <interest at qt-project.org>
> Subject: Re: [Interest] Qt Android App and Notifications - Black screen after tapping a notification with app open on background.
> My launch mode is singleTop. I had singleTask but I have changed to singleTop without success. I don’t know the reason for having singleTask. I don’t remember. 
> Also, I use Parse to receive and handle push notifications so I have the following filter to change the background color of the notification on Lollipop
>  
> import com.parse.ParsePushBroadcastReceiver;
> import android.app.Notification;
> import android.content.Context;
> import android.content.Intent;
> import android.os.Build;
> import android.util.Log;
>  
> public class IPushBroadcastReceiver extends ParsePushBroadcastReceiver
> {
>     @Override
>     protected Notification getNotification(Context context, Intent intent)
>     {
>         Notification notification = super.getNotification(context, intent);
>  
>         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
>         {
>             notification.color = 0xff000000;
>         }
>  
>         return notification;
>     }
> }
>  
>  
> On 30 Aug 2016, at 16:28, Jason H <jhihn at gmx.com <x-msg://53/jhihn@gmx.com>> wrote:
>  
> I don't have a problem with notifcations like that.
> What are you doing to bring your activity to the front?
> I'd suspect you start an intent, and have the SINGLE_TOP flag on the activity, or something like that?
>  
> Sent: Tuesday, August 30, 2016 at 11:12 AM
> From: "Nuno Santos" <nunosantos at imaginando.pt <x-msg://53/nunosantos@imaginando.pt>>
> To: "Qt Project MailingList" <interest at qt-project.org <x-msg://53/interest@qt-project.org>>
> Subject: [Interest] Qt Android App and Notifications - Black screen after tapping a notification with app open on background.
> Hi,
>  
> When my app has a notification I want to tap on the notification and open the app. If the app is closed, it works correctly. When the app is open in the background, it gets a black screen.
>  
> Has anyone had this problem in the past? Any suggestion?
>  
> Thanks,
>  
> Nuno
> _______________________________________________ Interest mailing list Interest at qt-project.org <x-msg://53/Interest@qt-project.org> http://lists.qt-project.org/mailman/listinfo/interest <http://lists.qt-project.org/mailman/listinfo/interest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160830/be44f54a/attachment.html>


More information about the Interest mailing list