public override void OnCreate()
        {
            var options = AirshipConfigOptions.LoadDefaultOptions(this);

            // Optionally, customize your config
            options.InProduction         = false;
            options.DevelopmentAppKey    = "";
            options.DevelopmentAppSecret = "";

            UAirship.TakeOff(this, options);

            //use CustomPushNotificationBuilder to specify a custom layout
            CustomPushNotificationBuilder nb = new CustomPushNotificationBuilder();

            nb.StatusBarIconDrawableId = Resource.Id.icon;            //custom status bar icon

            nb.Layout = Resource.Layout.notification;
            nb.LayoutIconDrawableId = Resource.Id.icon;            //custom layout icon
            nb.LayoutIconId         = Resource.Id.icon;
            nb.LayoutSubjectId      = Resource.Id.subject;
            nb.LayoutMessageId      = Resource.Id.message;

            PushManager.Shared().NotificationBuilder  = nb;
            PushManager.Shared().IntentReceiver       = Class.FromType(typeof(IntentReceiver));
            UALocationManager.Shared().IntentReceiver = Class.FromType(typeof(IntentReceiver));
        }
        protected void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set the actionBar to have up navigation
            ABSActionBar actionBar = SupportActionBar;

            if (actionBar != null)
            {
                actionBar.SetDisplayOptions(
                    ABSActionBar.DisplayHomeAsUp, ABSActionBar.DisplayHomeAsUp);
            }


            AirshipConfigOptions options = UAirship.Shared().AirshipConfigOptions;

            // Only add the push preferences if the pushServiceEnabled is true
            if (options.PushServiceEnabled)
            {
                this.AddPreferencesFromResource(Resource.Xml.push_preferences);
            }

            // Only add the location preferences if the locationServiceEnabled is true
            if (options.LocationOptions.LocationServiceEnabled)
            {
                this.AddPreferencesFromResource(Resource.Xml.location_preferences);
            }

            // Display the advanced settings
            if (options.PushServiceEnabled)
            {
                this.AddPreferencesFromResource(Resource.Xml.advanced_preferences);
            }

            // Creates the UAPreferenceAdapter with the entire preference screen
            preferenceAdapter = new UAPreferenceAdapter(PreferenceScreen);
        }
예제 #3
0
        protected void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            AirshipConfigOptions options = UAirship.Shared().AirshipConfigOptions;

            // Only add the push preferences if the pushServiceEnabled is true
            if (options.PushServiceEnabled)
            {
                this.AddPreferencesFromResource(Resource.Xml.push_preferences);
            }

            // Only add the location preferences if the locationServiceEnabled is true
            if (options.LocationOptions.LocationServiceEnabled)
            {
                this.AddPreferencesFromResource(Resource.Xml.location_preferences);
            }

            // Display the advanced settings
            if (options.PushServiceEnabled)
            {
                this.AddPreferencesFromResource(Resource.Xml.advanced_preferences);
            }
        }
예제 #4
0
 public static void TakeOff(Application application, AirshipConfigOptions configOptions, Action <UAirship> callback)
 {
     TakeOff(application, configOptions, new AirshipReadyCallback(callback));
 }
예제 #5
0
 public static void TakeOff(Application application, AirshipConfigOptions configOptions, Action<UAirship> callback)
 {
     TakeOff (application, configOptions, new AirshipReadyCallback (callback));
 }