[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 17:32:12 CEST 2016


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> 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>
> To: "Qt Project MailingList" <interest at 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 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/23db9e61/attachment.html>


More information about the Interest mailing list