So I wrote a code for SystemSounds as per the examples it worked, so i was experimenting with notification for one of my projects using the Android’s NotificationManager
Refrence: http://developer.android.com/reference/android/app/Notification.Builder.html
So here is the code for that:
CASE 1: Tried without the setSmallIcon
object ShowNotification(Context c, object[] args)
{
var notification = new Notification.Builder(Activity.GetAppAcitivity()).setContentTitle("Title of the Notification").setContentText("content in the notification").build();
var id =122;
NotificationManager.notify(id,notification);
return null;
}
RESULT ERRROR : 'Android.android.app.Notification' does not contain a member called 'Builder'.
CASE 2: Commented a few lines to check what errors i got
object ShowNotification(Context c, object[] args)
{
//var notification = new Notification.Builder(Activity.GetAppAcitivity()).setContentTitle("Title of the Notification").setContentText("content in the notification").build();
var id =122;
NotificationManager.notify(id,notification);
return null;
}
RESULT ERROR: 'Android.android.app.NotificationManager.notify(int,Android.android.app.Notification)' is non-static and cannot be accessed from a static context
And the Query for Android Images:
Notification.Builder(Context).setSmallIcon(image);
takes image as a type and it needs to be in R.drawable.image format how do we define our drawables in fuse?
I will try other Android Apis to check how to go about till i figure out how to get this working.
Thanks!