Page 1 of 1

Kinvey push

PostPosted: Tue Mar 14, 2017 6:50 am
by Lena
Duplication by push
I have a problem as in the comments from Steve J.
What do you advise?

Re: Kinvey push

PostPosted: Tue Mar 14, 2017 7:04 am
by Lena
Steps:
1. Install the application on the android device.
2. Send one push from Kinvey panel.
Result:
Good. All well see one push in application.
3. Remove this application from the android device.
4. Install again this application on the android device.
5. Send one push from Kinvey panel.
Result:
Bad - we get duplication by push in this application.

Code: Select all
void __fastcall TForm1::PushEvents1PushReceived(TObject *Sender, TPushData * const AData)

{

 if (NotificationCenter1->Supported() && AData->Message != "")
  {
   TNotification * myNotification = NotificationCenter1->CreateNotification();

   __try
   {
    NotificationCenter1->CancelAll();
    myNotification->AlertBody = AData->Message;
    NotificationCenter1->PresentNotification(myNotification);
   }
   __finally
         {
          myNotification->DisposeOf();
         }
  }

}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormShow(TObject *Sender)
{
  NotificationCenter1->CancelAll();
}