last day (15 days later) » 

6:04 AM
hi
 
hi,first i found some issue,maybe the reason
 
what issue
 
notificationManager.Notify(randomNumber, builder.Build());
this in your broadcast reciever
you use randomNumber as your notificationid
 
oh ok so i should set here customer id?
 
so when you call notificationManager.Cancel(id);,the id is the same as randomNumber ?
the id you want to cancel must be the same as the notificationid you notify
 
6:07 AM
no, notificationManager.Cancel(id) id is customer id
ok let me try id
try it *
 
yes
have a try
 
6:20 AM
still coming
let me tell you what i am doing
i HAVE view model
void Switch_Toggled()
{

if (NotificationONOFF == false)
{

MessageText = string.Empty;
SelectedTime = DateTime.Now.TimeOfDay;
SelectedDate = DateTime.Today;
DependencyService.Get<ILocalNotificationService>().Cancel(Convert.ToInt32(Settings.Customerid));
}
}
when dependency service call it goes to xamarin.android class where i have this code
public void Cancel(int id)
{

var intent = CreateIntent(id);
var pendingIntent = PendingIntent.GetBroadcast(Application.Context, id, intent, PendingIntentFlags.UpdateCurrent);
var alarmManager = GetAlarmManager();
alarmManager.Cancel(pendingIntent);
var notificationManager = NotificationManagerCompat.From(Application.Context);
notificationManager.CancelAll();
notificationManager.Cancel(id);
}
 
let me see
alarmManager.Cancel(pendingIntent); alarmManager.SetRepeating(AlarmType.RtcWakeup, totalMilliSeconds, repeateForMinute, pendingIntent);
you make a break point,see if the pendingIntent is the same
 
i am checking the same
 
6:40 AM
Just no response, no error?
 
i m checking wait
i think it worked
i will be back in 20 mints
 
6:58 AM
ok
 

last day (15 days later) »