Toast is not displayed when completing the quest - google-play-services

Toast is not displayed when completing the quest.
For example, as shown below toast
http://cloud.addictivetips.com/wp-content/uploads/2013/07/Google-Play-Games-In-Game-Toast-2.png

Google Play Games does not automatically display a toast for a completed Quest like it does with an Achievement. Instead, you should register a Quest listener that implements onQuestCompleted() in your Activity as described on this page.
This is because a Quest is something that your app can choose to customize, specifically through the reward data you associate with the quest. You should handle the quest completion event and give the user the appropriate award. If you'd like to also display a Toast, you can do that with a normal Toast.makeText(...) call in the callback or even an AlertDialog styled by your application.

Related

Slack API: how to get state of all input/action elements at once upon submit

I'm trying to build rich, interactive Slack messages. Example: message with date picker, set of checkboxes and a long text. Upon submit (if modal) or push of an action button, I'd like to receive the current state of all interactive components.
I have tried regular messages with both input and action blocks...also tried modals. I get a message from Slack for every individual change to an interactive object, but not the state of all objects at once. Since the receiver of the interaction payload is stateless, this makes it impossible for me to properly react to the message.
Am I missing something? Appreciate every bit of advice.
OK, error seems to be on my side. I was just looking at the action payload preview in the Slack Block Kit Builder. When actually posting a message I see the state of all elements in the response.

how to handle heavy API request without blocking the UI in react native

i have some heavy API request made through my app. so i want to implement feature that if user hit any API request then after user should navigate through any screen but there is some loading icon indicating that API request is in progress.
For example :-
if user is in create-product screen and after clicking on create product button user should navigate through any screen like profile,,product-view or any other screen while API request is processing but i want to show some loading indicator from any screen that API request is in progress in background.
What you want is a singleton
Which is
A design pattern that ensures that exactly one application-wide instance of a particular class exists. One of the Gang of Four's creational design patterns.
I recommend you read more about it
It will be useful for your case
Here is how to make it with react native
React native- Best way to create singleton pattern

After displaying a Carousel card in Dailogflow, I want to select one of the lists by voice operation

Tell us about Dailogflow.
In the settings of Intents, it was set to display the Carousel card of GoogleAssistant in the response.
I've been able to display the carousel card, but I want to select one of these cards by voice action and open the URL set for that card.
I couldn't find it in the reference, so please let me know if there is a way to achieve this.
If this is not possible, is there any other way to achieve equivalent content?
I don't have good English.Thank you for reading.
You can use follow up intent. So when you are displaying a list or carousel card and you want to make this selection by click and as well as by user utterance. You have to add two follow up intent one for selection one for text utterance.
consider below example: ShippingOption intent displays a list and that can be selectable as well as get the response by user utterance.
app.js
intentMap.set("shippingOptionIntent", shippingOptionIntent);
intentMap.set("shippingOptionIntent - select", shippingOptionIntentSelect);
intentMap.set("shippingOptionIntentChoose", shippingOptionIntentChoose);
Now set the utterance for followup intent:
Where another followup intent responsible for user selection by clicking on the option. It has the google assistant option event.
So, in this way you can handle both types of responses.

Changing CSS variables based on JavaScript events

We have a Facebook app here which has three boxes with three buttons. Each button, when clicked, should change state once an event (successfully) happens. The buttons are almost all working (a few minor bugs) but they have been done a rather long-winded and inefficient way.
My question is, what is the most efficient way to link events (i.e. page 'liked', personal information submitted, page 'shared') with the state of the buttons?
You can use jQuery and the .trigger() function to fire off events. Then you can use .bind() to listen to the events and do something. For example, when the user logs in, you can trigger a user_logged_in_event, and bind to it. In the function, you can then use JS to change the login button to logout...

Creating a Logon Screen

What is the best way to make password/logon screen? Iread somewhere that it is better to use a popup control. If so where exactly do I need to create it, in App.xaml?
There are number of things you need to consider while implementing a login screen for your Windows Phone 7 application. Here is a sample that can give you an idea of how to get started, if you haven't. One of the important aspects of a login screen is its appearance on the "back stack" - the list that grows while you are within your application, each item in this list is accessible through the "back" button. Ideally, you wouldn't want the user to press the back button and view the login screen. In other words, the login screen should never be in the "back stack". Therefore, it is probably best to implement the login screen as popup, see Peter Torr's post discussing this.
Peter Torr published an article on "Places" which could help you design your application with the login screen.
Regarding implementation of a popup, I posted a simple example in the Answer linked below which you can check out. In this case it implements a context menu.. you can populate the popup with whichever contents make sense for your login screen.
http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/e6d2a444-91d9-4d69-937e-689b24c36c09
I recommend reading the two links Indyfromoz has hooked you up with for how to handle a login screen wrt the navigation service. This are the most relevant and the current posts on the topic of handling login screens and the like wrt the navigation service.