当前位置: 首页>>代码示例>>C#>>正文


C# Intent.ReplaceExtras方法代码示例

本文整理汇总了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;
        }
开发者ID:grenhall,项目名称:mobile,代码行数:8,代码来源:GcmBroadcastReceiver.cs

示例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;
        }
开发者ID:MilenPavlov,项目名称:treewatch,代码行数:18,代码来源:GeofenceBroadcastReceiver.cs

示例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;
        }
开发者ID:kwacks,项目名称:xamarin-plugins,代码行数:16,代码来源:GeofenceBroadcastReceiver.cs

示例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;
        }
开发者ID:lampshade9909,项目名称:xamarin-plugins,代码行数:12,代码来源:PushNotificationsReceiver.cs


注:本文中的Android.Content.Intent.ReplaceExtras方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。