void InitializeHockeyApp(string hockeyAppID) { CrashManager.Register(this, hockeyAppID); UpdateManager.Register(this, hockeyAppID, true); FeedbackManager.Register(this, hockeyAppID, null); MetricsManager.Register(Application); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Register the crash manager before Initializing the trace writer CrashManager.Register(this, HOCKEYAPP_APPID); // Register to with the Update Manager UpdateManager.Register(this, HOCKEYAPP_APPID); // Register MetricsManager to be able to use the Metrics Feature. MetricsManager.Register(Application, HOCKEYAPP_APPID); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); FindViewById <Button> (Resource.Id.buttonShowFeedback).Click += delegate { //Register with the feedback manager FeedbackManager.Register(this, HOCKEYAPP_APPID, null); //Show the feedback screen FeedbackManager.ShowFeedbackActivity(this); }; FindViewById <Button>(Resource.Id.buttonCauseCrash).Click += delegate { // Throw a deliberate sample crash throw new HockeyAppSampleException("You intentionally caused a crash!"); }; FindViewById <Button>(Resource.Id.buttonTrackEvent).Click += delegate { MetricsManager.TrackEvent("My custom event."); }; }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App()); // 註冊程式異常崩壞的回報機制 CrashManager.Register(this, HocKeyApp_ID); // 檢查是否有新版本推出,讓使用者可以選擇是否要升級 CheckForUpdates(); // 訊息中心訂閱者,當使用者在核心PCL內按下按鈕之後,訊息中心將會收到這個訊息通知,並且進行處理 MessagingCenter.Subscribe <我要回報>(this, "是的,請說", (sender) => { #region 讓使用者填寫意見,並記錄到 HocKeyApp FeedbackManager.Register(this, HocKeyApp_ID); FeedbackManager.ShowFeedbackActivity(ApplicationContext); #endregion }); }
protected void OnCreate(Bundle bundle , int idLayout , bool leftMenuExist = true , bool isBackButton = false) { base.OnCreate(bundle); _leftMenuExist = leftMenuExist; SetContentView(idLayout); _connectionService.Initialize(this, ConnectivityService); if (_leftMenuExist) // create menu { GetObjectsFromView(); SetDataToView(); } if (ToolbarPage != null) // create toolbar { SetSupportActionBar(ToolbarPage); if (isBackButton) { SupportActionBar.SetDisplayHomeAsUpEnabled(true); } } FeedbackManager.Register(this); //!important cf https://support.hockeyapp.net/discussions/problems/63855-feedback-feature-not-working-hockey-android-sdk // Allow users to connect to your app with Facebook // can crash if commented //FacebookSdk.SdkInitialize(ApplicationContext); }
public void Init() { #if !DEBUG CrashManager.Register(_context, Secrets.AndroidHockeyId, new HockeyListener()); MetricsManager.Register(_app, Secrets.AndroidHockeyId); MetricsManager.EnableUserMetrics(); FeedbackManager.Register(_app, Secrets.AndroidHockeyId); #endif }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); CrashManager.Register(this, HockeyappConstants.DroidHockeyAppID); UpdateManager.Register(this, HockeyappConstants.DroidHockeyAppID, true); FeedbackManager.Register(this, HockeyappConstants.DroidHockeyAppID, null); HockeyApp.Android.Metrics.MetricsManager.Register(this, Application, HockeyappConstants.DroidHockeyAppID); LoadApplication(new App()); }
// This override is called only once during the activity's lifecycle, when it is created. protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); HockeyApp.MetricsManager.TrackEvent("AcquaintanceListActivity.OnCreate"); // instantiate adapter _Adapter = new AcquaintanceCollectionAdapter(); // instantiate the layout manager var layoutManager = new LinearLayoutManager(this); // set the content view SetContentView(Resource.Layout.AcquaintanceList); // setup the action bar SetSupportActionBar(FindViewById <Toolbar>(Resource.Id.toolbar)); // ensure that the system bar color gets drawn Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds); // set the title of both the activity and the action bar Title = SupportActionBar.Title = "Acquaintances"; _SwipeRefreshLayout = (SwipeRefreshLayout)FindViewById(Resource.Id.acquaintanceListSwipeRefreshContainer); _SwipeRefreshLayout.Refresh += async(sender, e) => { await LoadAcquaintances(); }; _SwipeRefreshLayout.Post(() => _SwipeRefreshLayout.Refreshing = true); // instantiate/inflate the RecyclerView var recyclerView = (RecyclerView)FindViewById(Resource.Id.acquaintanceRecyclerView); // set RecyclerView's layout manager recyclerView.SetLayoutManager(layoutManager); // set RecyclerView's adapter recyclerView.SetAdapter(_Adapter); var addButton = (FloatingActionButton)FindViewById(Resource.Id.acquaintanceListFloatingActionButton); FeedbackManager.Register(this, Settings.HockeyAppId); addButton.Click += (sender, e) => { //StartActivity(new Intent(this, typeof(AquaintanceEditActivity))); FeedbackManager.ShowFeedbackActivity(ApplicationContext); }; CheckForUpdates(); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); CrashManager.Register(this, Appid); FeedbackManager.Register(this, Appid); MetricsManager.Register(this, Application, Appid); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App()); CheckForUpdates(); }
protected override void OnCreate(Bundle bundle) { var appId = "266b3657c18643bdb33b1b5004f0fb77"; CrashManager.Register(this, appId); FeedbackManager.Register(this, appId); ServiceLocator.Instance.Add <IHockeyAppService, HockeyAppService>(); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); HockeyApp.Android.Utils.HockeyLog.LogLevel = 3; MyCrashManagerListener listener = new MyCrashManagerListener(); listener.userID = "v-zhjoh"; listener.userContact = "*****@*****.**"; Android.Util.Log.Debug("HockeyApp", "Add Debug info into Description"); CrashManager.Register(this, AppID, listener); //CrashManager.Register(this, AppID); UpdateManager.Register(this, AppID); FeedbackManager.Register(this, AppID); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(CreateApp()); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it btnClickMe = FindViewById <Button>(Resource.Id.btnClickMe); btnCrash = FindViewById <Button>(Resource.Id.btnCrash); btnFeedback = FindViewById <Button>(Resource.Id.btnFeedback); btnClickMe.Click += Button_Click; btnCrash.Click += BtnCrash_Click; btnFeedback.Click += BtnFeedback_Click; //HockeyApp 관련 추가 코드 CrashManager.Register(this, AppID); FeedbackManager.Register(this, AppID); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); const string appId = "13811f19fe0540a184511b18374628d1"; CrashManager.Register(this, appId); MetricsManager.Register(Application, appId); var feedbackButton = new Xamarin.Forms.Button() { Text = "Feedback" }; feedbackButton.Clicked += (sender, e) => { FeedbackManager.Register(this, appId); FeedbackManager.ShowFeedbackActivity(this); }; global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App(feedbackButton)); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); HockeyLog.LogLevel = 3; // Register the crash manager before Initializing the trace writer CrashManager.Register(this, HOCKEYAPP_APPID); //Register to with the Update Manager UpdateManager.Register(this, HOCKEYAPP_APPID); MetricsManager.Register(Application, HOCKEYAPP_APPID); var showFeedbackButton = new Xamarin.Forms.Button { Text = "Show Feedback" }; showFeedbackButton.Clicked += (sender, e) => { //Register with the feedback manager FeedbackManager.Register(this, HOCKEYAPP_APPID, null); //Show the feedback screen FeedbackManager.ShowFeedbackActivity(this); }; var causeCrashButton = new Xamarin.Forms.Button { Text = "Cause Crash" }; causeCrashButton.Clicked += (sender, e) => { // Throw a deliberate sample crash throw new HockeyAppSampleException("You intentionally caused a crash!"); }; global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App(showFeedbackButton, causeCrashButton)); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Init view SetContentView(Resource.Layout.About); this.SetSystemBarBackground(Resource.Color.HomeMaticBlue); SetSupportActionBar(FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar)); SupportActionBar.SetDisplayHomeAsUpEnabled(true); // Register Hockey App Feedback FeedbackManager.Register(this, App.HockeyAppKey); // Set version according to the AppManifest var tvVersion = FindViewById <TextView>(Resource.Id.tvVersion); tvVersion.Text = PackageManager.GetPackageInfo(PackageName, 0).VersionName; // Feedback button var btnFeedback = FindViewById <Button>(Resource.Id.btnFeedback); btnFeedback.Click += (sender, e) => FeedbackManager.ShowFeedbackActivity(this); }
public void LaunchHockeyAppFeedback() { FeedbackManager.Register(MainActivity.CurrentActivity, AppSettings.HockeyAppID, null); FeedbackManager.ShowFeedbackActivity(MainActivity.CurrentActivity); }
public void Register(Context context, string appId) { FeedbackManager.Register(context, appId); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); //it crashes on versions below 21 if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Lollipop) { Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds); } // Check if we have the necessary permissions and request them if we don't // Note that the app will still fail on first launch and needs to be restarted SetUpPermissions(); InitializeExtendedLocationListener(); geoLocation = new GeoLocation { Latitude = extendedLocationListener.Latitude, Longitude = extendedLocationListener.Longitude }; exhibitSet = ExhibitManager.GetExhibitSets().First(); //Permissions SetUpPermissions(); // Navigation Drawer SetUpNavigationDrawer(); //FeedbackManager.Register(this); FeedbackManager.Register(this, KeyManager.Instance.GetKey("hockeyapp.android"), new HipFeedbackListener()); if (savedInstanceState == null) { // Set overview fragment exhibitsOverviewFragment = new ExhibitsOverviewFragment { ExhibitSet = exhibitSet, GeoLocation = geoLocation }; if (FindViewById(Resource.Id.main_fragment_container) != null) { var transaction = SupportFragmentManager.BeginTransaction(); transaction.Replace(Resource.Id.main_fragment_container, exhibitsOverviewFragment); transaction.Commit(); } } else { askForUpdates = savedInstanceState.GetBoolean(UpdateKey); exhibitsOverviewFragment = (ExhibitsOverviewFragment)SupportFragmentManager.GetFragment(savedInstanceState, ExhibitsOverviewFragString); } // hockeyapp code if (askForUpdates) { CheckForUpdates(); } }