Intent in Notification does not work in Trial Version

Hello,
sorry if im in wrong forum but i have problems with Trial version of Xamarin. When i use Starter version everything is ok my code for Notification works, this is the code:

Intent intent = new Intent (this, typeof(MainActivity));
                        intent.PutExtra ("KanalID", item.Id.ToString ());

                        const int pendingIntentId = 0;
                        PendingIntent pendingIntent = PendingIntent.GetActivity (this, pendingIntentId, intent, PendingIntentFlags.UpdateCurrent);

                        Notification.BigTextStyle txtStyle = new Notification.BigTextStyle ();
                        string longMessage = "Temperatur zu niedrig ist. Bitte erhöhen die Temperatur.";
                        txtStyle.BigText (longMessage);
                        Notification.Builder builder = new Notification.Builder (this)
                            .SetContentIntent (pendingIntent)
                            .SetAutoCancel (true)
                            .SetContentTitle ("Temperaturwarnung!")
                            .SetStyle(txtStyle)
                            .SetDefaults (NotificationDefaults.Sound | NotificationDefaults.Vibrate | NotificationDefaults.Lights)
                            .SetSmallIcon (Resource.Drawable.IBTTermometerNOK72);

                        Notification notify = builder.Build ();

                        NotificationManager notifimng = GetSystemService (Context.NotificationService) as NotificationManager;

                        const int notID = 1;
                        notifimng.Notify (notID, notify);

On my MainActivity I use this:

string _kanalID = Intent.GetStringExtra ("KanalID");

            if (_kanalID != null) {

                IBTinfoFragAfterNot  frag = new IBTinfoFragAfterNot ();
                Bundle args = new Bundle ();
                //string value = _kanalID.ToString ();
                args.PutString ("Key", _kanalID);
                frag.Arguments = args;
                var trans = FragmentManager.BeginTransaction();
                //trans.Remove(new MainListIBTFrag());
                trans.Replace(Resource.Id.FragmentCont, frag, "BlumenInfo");
                trans.AddToBackStack(null);
                trans.Commit();
            }

But when i activate Trial Version this Intent does not work, or this part of the code does not work:

string _kanalID = Intent.GetStringExtra ("KanalID");

            if (_kanalID != null) {

                IBTinfoFragAfterNot  frag = new IBTinfoFragAfterNot ();
                Bundle args = new Bundle ();
                //string value = _kanalID.ToString ();
                args.PutString ("Key", _kanalID);
                frag.Arguments = args;
                var trans = FragmentManager.BeginTransaction();
                //trans.Remove(new MainListIBTFrag());
                trans.Replace(Resource.Id.FragmentCont, frag, "BlumenInfo");
                trans.AddToBackStack(null);
                trans.Commit();
            }

Any solutions?
Thanks

Sign In or Register to comment.