How to call content page from Xamarin Android Project

IbrahimDarahem.4135IbrahimDarahem.4135 SAMember
edited November 2017 in Cross Platform with Xamarin

Dear all,
Can anybody help me, I want to open content page (which is in PCL Project) from Android project.

Exactly:

my Code is (for make notification in android project):

public string SendNotification()
{
//**************************************************************************************
//** in this line I want to navigate to PCL Page instead of "MainActivity" intent ****
//**************************************************************************************
Intent intent = new Intent(Android.App.Application.Context, typeof(MainActivity));

        const int pendingIntentId = 0;
        PendingIntent pendingIntent =
            PendingIntent.GetActivity(Android.App.Application.Context, pendingIntentId, intent, PendingIntentFlags.OneShot);


        Notification.Builder builder = new Notification.Builder(Android.App.Application.Context)
            .SetContentIntent(pendingIntent)
            .SetContentTitle("Sample Notification")
            .SetContentText("Hello World! This is my first notification!")
            .SetSmallIcon(Resource.Drawable.notififcation_icon);

        Notification notification = builder.Build();

        NotificationManager notificationManager =
            Android.App.Application.Context.GetSystemService(Context.NotificationService) as NotificationManager;

        const int notificationId = 0;
        notificationManager.Notify(notificationId, notification);

}

Thanks in advance

Sign In or Register to comment.