本文整理汇总了C#中Android.Content.Intent.ReplaceExtras方法的典型用法代码示例。如果您正苦于以下问题:C# Intent.ReplaceExtras方法的具体用法?C# Intent.ReplaceExtras怎么用?C# Intent.ReplaceExtras使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Content.Intent
的用法示例。
在下文中一共展示了Intent.ReplaceExtras方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnReceive
public override void OnReceive (Context context, Intent intent)
{
var serviceIntent = new Intent (context, typeof (GcmService));
serviceIntent.ReplaceExtras (intent.Extras);
StartWakefulService (context, serviceIntent);
ResultCode = Result.Ok;
}
示例2: OnReceive
/// <Docs>The Context in which the receiver is running.</Docs>
/// <summary>
/// This method is called when the BroadcastReceiver is receiving an Intent
/// broadcast.
/// </summary>
/// <param name="context">Context object.</param>
/// <param name="intent">Intent object.</param>
public override void OnReceive(Context context, Intent intent)
{
System.Diagnostics.Debug.WriteLine(string.Format("{0} - {1}", CrossGeofence.Id, "Region State Change Received"));
var serviceIntent = new Intent(context, typeof(GeofenceTransitionsIntentService));
serviceIntent.AddFlags(ActivityFlags.IncludeStoppedPackages);
serviceIntent.ReplaceExtras(intent.Extras);
serviceIntent.SetAction(intent.Action);
WakefulBroadcastReceiver.StartWakefulService(context, serviceIntent);
this.ResultCode = Result.Ok;
}
示例3: OnReceive
/// <summary>
/// On geofence update received fires an intent to be handled by GeofenceTransitionsIntentService
/// </summary>
/// <param name="context"></param>
/// <param name="intent"></param>
public override void OnReceive(Context context, Intent intent)
{
Debug.WriteLine("{0} - {1}", CrossGeofence.Id, "Region State Change Received");
var serviceIntent = new Intent(context, typeof(GeofenceTransitionsIntentService));
serviceIntent.AddFlags(ActivityFlags.IncludeStoppedPackages);
serviceIntent.ReplaceExtras(intent.Extras);
serviceIntent.SetAction(intent.Action);
StartWakefulService(context, serviceIntent);
ResultCode = Result.Ok;
}
示例4: OnReceive
public override void OnReceive(Context context, Intent intent)
{
var serviceIntent = new Intent(context,typeof(PushNotificationImplementation));
serviceIntent.AddFlags(ActivityFlags.IncludeStoppedPackages);
serviceIntent.ReplaceExtras(intent.Extras);
serviceIntent.SetAction( intent.Action);
StartWakefulService(context, serviceIntent);
ResultCode = Result.Ok;
}