Launch watchkit app from long custom notification content area - watchkit

I'm trying to implement a feature such that users can click on the notification content area (not app icon nor action buttons) to bring the main watchkit app open. The current official way to launch the main watchkit app is to tap the app icon or action buttons in a notification scene. But I feel like the app icon is actually quite small (and hard) to tap and sometimes users are not even aware of this feature.
What I'm trying to do now is to put my notification content into a table row in the notification controller and make this row clickable. This will give user a pretty big area to tap with. Then in the click event handler I'm trying to open the main watchkit app. But I haven't figure out a way to do that (none of the general navigation methods such as presentControllerWithName works from notification controller).
Any suggestions?

Related

Changing a tab page when pressing the back button in Xamarin.Forms and Prism

I have a Xamarin.Forms application using Prism (Xamarin.Forms v4.5.0; Prism v7.2.0).
The main application is 4 tabbed pages. Using the Prism NavigationService I can switch tabs easily using something like this - NavigationService.SelectTabAsync("Page2");
But if the user presses the back button, it just exits the application.
Is there a way to add the tab changes into the navigation stack so pressing back would just go to the previously selected tab?

Respond to split-screen changes in Xamarin.Forms

In my Xamarin.Forms app, I have a MasterDetailPage with MasterBehavior set to Split when the device Idiom is Tablet. That is, I always want master page to be displayed.
The exception is during multitasking. For example, on iOS, if the user enters Split View, then I want the app to behave like it's on a phone, with no split view, but instead just a master or detail page displayed, and the proper navigation controls to move between them.
It seems like MasterDetailPage wants to help me with this. When I drag up another app to enter Split View on iOS, my app no longer shows the master page. However, the detail page that remains has no navigation control to return to the master.
What is the proper way to detect the mode change and dynamically adjust the navigation in Xamarin.Forms when your app enters and leaves Split View on iOS or split-screen mode on Android?

opening google map fragment on button click in android studio

I would like to create an app in Android Studio that has a Button in Main Activity and when i clicks this button, it should open a google map with my customized lat,lng markers and camera functions as an another activity. I tried this one by creating a Button in the Main Activity.XML and wrote buttonOnClickListener() by specifying Intent that MainActivity.this,Mapfragment.class.For this I selected GoogleMaps as my start Activity instead of blank activity at starting of my project. And also for this MapFragment, I got Google maps API key. But when I run this App on my android mobile, it simply opening google map with my customized lat,lng instead of showing my Main Activity which is having a Button in it. I am confused with this, can anyone help me out of this problem.Thank You
Yes, I got it. I tried to solve this problem and got a solution for it. Initially as I said, at the starting of my project I selected a google map activity instead of blank activity. So now, to get a Button in my Main activity, I have created a MainActivity.XML in Layout folder and added a Button to it. Then, for this MainActivity.XML file corresponding .Java class was created and specified the MainActivity.XML in it and declared the Button and wrote OnClickListener for Button, so that when the Button clicks it should open my google map fragment with customized location. Importantly, we should specify this mainactivity.java in the Manifest.XML as an Activity specifying it as a Launcher activity in the Application. Now, run the app and first it displays MainActivity with a Button and now when I clicks it, it opens my google map fragment activity with the help of Intent.

Adding custom buttons to send message notification using Microsoft Band SDK

I have been playing with the Microsoft Band SDK and I have figured out that it is possible to create custom tile layouts and buttons along with event click receivers like ACTION_TILE_OPENED, ACTION_TILE_BUTTON_PRESSED, and ACTION_TILE_CLOSED.
However, is it possible to add custom buttons when doing send message notifications? Such that when a message is receive, the user can swipe left and see additional action buttons he/she can tap, and also tie this button to a click handler method? I have been trying to figure this out all day, but no success.
Example:
When a text (SMS) message is receive in the band, you can swipe left to see two buttons: "Dismiss" and "Reply". I was wondering if it is possible to also create this type of notification with buttons.
No, currently there are no means to customize notifications (messages or dialogs) sent to the Band.

How to make the back button act as the home button in Android

I have a very simple application. The app asks a question and depending on what the user clicks a different text is shown. Now, when the home button is pressed the phone goes to the home screen and the app pauses.
But when I press the back button the dialog goes away but the white background (Default in an app made by eclipse) is still there. Then I have to press the back button once more to get to the home screen.
My question, is there a way to make the back button act as the home button to return to the home screen? If there is, what is it.
I have tried using onStop and onResume and onPause but the same thing happens.
Thanks,
dhoehna.
Sounds like android SDK. So, I'm going to assume you are doing Android development.
You'll have to override the method called OnBackPressed(). Then you can override the back button to do what you want it to do.

Resources