Note: This integration is needed in addition to the integration steps outlined in the Xamarin integration page found here.
There are three files needed to add the Xtremepush functionality to your Xamarin.Forms app. These are the Xtremepush interface, and its implementation for the Android and iOS platforms.
Add the IXPushDelegate to the shared code section of your app.
Now open the IXPushDelegate and be sure to change the namespace to your own.
Now add the XPushDelegate.cs files from the Android and iOS folders to the relevant platform section. Again, afterwards, you will need to open these files and change the namespace to your own.
For Android, you will also need to add the nuget package Plugin.CurrentActivity.
Once the project has been set up with a common interface and implementations for each platform, use DependencyService to get the right implementation at runtime.
On android, to handle the returned Message list, you must implement the IPushListListener interface.
This interface has a single method 'PushListReceived'. An example is shown below.
On iOS, in the XPushDelagate.cs file, GetPushList takes a callback method as its third Parameter. This is set as default, to a method called PushListCallback, which is also in the file. However you can change this to another method if you wish.