I'm trying to start a service in a remote process with Monodroid and it doesn't 
seem to work.

Part of my service is as follows:

namespace INS_Android_Mono.Service
{
    [Service(Label = "INS Notification Service", Process = ":ins_service")]
    [IntentFilter(new string[] { InsNotificationService.IntentFilterAction })]
    public class InsNotificationService : Android.App.Service
    {
        public const string IntentFilterAction = 
"ins_android_mono.InsNotificationService";

        private const string Tag = "InsNotificationService";

        private SipMessageBroadcastReceiver _sipMessageReceiver;

        public override IBinder OnBind(Intent intent)
        {
            Log.Info(Tag, "OnBind");
            return null;
        }

        public override StartCommandResult OnStartCommand(Intent intent, 
StartCommandFlags flags, int startId)
        {
            NotificationManager manager = (NotificationManager) 
this.GetSystemService(Context.NotificationService);
            var builder = new Notification.Builder(this)
                .SetContentTitle("INS Notification Service")
                .SetContentText("Monitoring incoming notifications.")
                .SetSmallIcon(Resource.Drawable.crab);

            this.StartForeground(1, builder.Notification);

            return StartCommandResult.Sticky;
        }
        ...
        ...
    }
}


And the code that starts it:

this.StartService(new Intent(InsNotificationService.IntentFilterAction));

This works fine if I remove the Process attribute but if I define it nothing 
happens.  StartService doesn't throw and seems to return a valid ComponentName. 
 I'm at a loss.

Mono For Android: 4.4.55

Jeremy
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to