Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

APP freeze when i start it using notification pending intent in nadroid

$
0
0

Hi guys .. so I'm using UrhoSharp 1.5.22 and its work perfectly but when i send notification using notification manager and try to click it, the app freeze with white blank page without throwing exception....i even try to put break point and it didn't work ether ... in earlier use of urho 1.1.214 this problem doesn't appear but i don't think i can take instance from Urho Application class that control the scene .
my code of Surface creation is:

        var mLayout = FindViewById<AbsoluteLayout>(Resource.Id.absoluteLayout1);
        var surface = UrhoSurface.CreateSurface(this);
        mLayout.AddView(surface);
        var app = await surface.Show<MyScene>(null, false);

and for notification :
void SendNotification(string newnot, int ico)
{
var nMgr = (NotificationManager)GetSystemService(NotificationService);
var notification = new Notification(ico, "blablabla");
Intent intent = new Intent(this, typeof(MainActivity));
intent.SetFlags(ActivityFlags.NewTask | ActivityFlags.SingleTop | ActivityFlags.ClearTask);
var pendingIntent = PendingIntent.GetActivity(this, 0, intent,0);
notification.SetLatestEventInfo(this, "blablabla", newnot, pendingIntent);
nMgr.Notify((int)NotificationFlags.ForegroundService, notification);
}
ActivityFlags.NewTask neded because i need to start the app from Service

// ============== if it was a bug in urho release please let me no if i can take the instance in 1.1.2.14 release for example or it will be fixed in the next version.
thanks .


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>