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 }); }
//handles the action when touching the menuitems in navigationview private void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e) { switch (e.MenuItem.ItemId) { case Resource.Id.nav_home: // React on 'Home' selection break; case Resource.Id.nav_route: StartActivity(typeof(RouteActivity)); break; case Resource.Id.nav_licenses: StartActivity(typeof(LegalNoticeActivity)); break; case Resource.Id.nav_feedback: FeedbackManager.ShowFeedbackActivity(ApplicationContext); break; case Resource.Id.nav_preferences: StartActivity(typeof(SettingsActivity)); break; } // Close drawer drawerLayout.CloseDrawers(); }
public void HearShake() { FeedbackManager.RequireUserEmail = FeedbackUserDataElement.Required; FeedbackManager.RequireUserName = FeedbackUserDataElement.Required; FeedbackManager.SetActivityForScreenshot(this); FeedbackManager.TakeScreenshot(this); FeedbackManager.ShowFeedbackActivity(this); }
// 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(); }
/// <summary> /// Navigate to the feedback user /// </summary> private void OnFeedbackButtonLayout_Clicked(object sender, EventArgs e) { if (_connectionService.IsDeviceConnectedToInternet() && App.CurrentUserEnvironment.User.Email != null) { FeedbackManager.SetUserEmail(App.CurrentUserEnvironment.User.Email); FeedbackManager.SetUserName(string.Format("{0} {1}" , App.CurrentUserEnvironment.User.FirstName , App.CurrentUserEnvironment.User.LastName)); FeedbackManager.ShowFeedbackActivity(this); FeedbackManager.CheckForAnswersAndNotify(this); } else { Toast.MakeText(this, Resource.String.errorEmail, ToastLength.Long); } }
private void OnSupportMenuSelection(int i) { switch (i) { case 0: ResourceLocator.SystemControlsLauncherService.LaunchUri( new Uri("https://github.com/Drutol/MALClient/issues")); break; case 1: AndroidViewModelLocator.Settings.ReviewCommand.Execute(null); break; case 2: ViewModelLocator.GeneralMain.Navigate(PageIndex.PageSettings, SettingsPageIndex.About); SetActiveButton(HamburgerButtons.Settings); _drawer.CloseDrawer(); break; case 3: ResourceLocator.SystemControlsLauncherService.LaunchUri(new Uri("https://www.paypal.me/drutol")); break; case 4: ViewModelLocator.GeneralMain.Navigate(PageIndex.PageSettings, SettingsPageIndex.Ads); SetActiveButton(HamburgerButtons.Settings); _drawer.CloseDrawer(); break; case 5: DisplayVideoAd(); _drawer.CloseDrawer(); break; case 6: FeedbackManager.ShowFeedbackActivity(ApplicationContext); break; } _supportMenu.Dismiss(true); }
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); }
private void FeedbackClick(object sender, EventArgs e) { FeedbackManager.ShowFeedbackActivity(ApplicationContext); }
public void LaunchHockeyAppFeedback() { FeedbackManager.Register(MainActivity.CurrentActivity, AppSettings.HockeyAppID, null); FeedbackManager.ShowFeedbackActivity(MainActivity.CurrentActivity); }
public async Task <bool> DisplayFeedbackPage() { await Task.Run(() => FeedbackManager.ShowFeedbackActivity(Forms.Context)); return(true); }
public async Task GiveFeedback() { await Task.Run(() => FeedbackManager.ShowFeedbackActivity(Forms.Context)); }
public void ShowFeedbackList() { FeedbackManager.ShowFeedbackActivity(Application.Context); }