Initiating an app manually - google-mirror-api

Is it possible for the user to initiate interaction with glassware, rather than responding to cards that appear unsummoned? I plan to create an app that will only be useful in situations the user identifies.
I combed the documentation some and didn't find anything describing this, but it seems necessary.

You can use a Pinned TimelineItem
https://developers.google.com/glass/v1/reference/timeline
set isPinned to true and the card will appear on the left of the home screen. Users can then initiate your app functionalities through that card's custom actions.

A user can initiate interaction by tapping/using heads up to get to the OK GLASS prompt, then swiping to a card inserted by the Glassware, then tapping on the card, then tapping on an action. They can also share various items to contacts inserted by the Glassware. See the documentation on subscribing to user notifications:
https://developers.google.com/glass/about#subscribing_to_timeline_notifications

Related

Want to show orders notifications from orders api in React.js

I am building a warehouse management system for WordPress store in React.js: I have built an API (http://wms-api.martoo.com/api/wms-orders) for orders and fetching all the orders in my React Dashboard.
Now I want to show notification for each order in my React dashboard. What's the best approach for that to show notification automatically when someone places an order through WordPress eCommerce. Probably sockets can help but I am looking for the solution. I will appreciate your help.
I have checked for different methods but non worked. I have tried webhooks, cron jobs but this method is effiecient. I have used pusher
Go at https://pusher.com/
Click on "Get a free account". Then register yourself at it.
Create a new App at the Channels tab.
Write the name of your app anything you want.
Choose ap2 (Asia Pacific(Mumbai)) or any other closer to the region of the website's owner on the cluster tab.
Ignore everything else and click on create.
Go to the apps tab in the navigation menu and click on the app you've created.
Read documentation for further instructions

How to have a screen intermittently render in React Native (with Expo)

I'm building a React Native (with Expo) app and have a survey form screen that I want to have appear intermittently for the user to fill out. Let's call it SurveyScreen. I'm doing this by setting a setInterval to poll the backend server hourly for scheduling data to see if the user is due to fill out a survey. This will probably be done in the main App.js in componentDidMount
The above seems straightforward to me. What I'm not clear on is once the polling api determines that the user is due for a survey, how to have the app display SurveyScreen no matter what page the user is on in the app.
One point of clarification is should SurveyScreen appear immediately after receiving a green light api response or should the screen appear after the next user action, e.g. navigation to another page, tap a button, etc? I think either way would be fine at this point. Would love to know both ways if possible.
Any ideas? Thanks.
Update the state.
Example: you subscribe to api => event fires => you update state => survey pops up
You can use portal to easily position survey on top of everything.

To show that the new update is available in app store

In most of the app, I've seen that whenever the new update is available, it is shown in dialog box as soon as the app is opened. I think it is not a push notification since the notification msg doesn't appear in notification bar but only in a dialog box with remind me later, cancel go to appstore etc option when the app is opened.
This is a common practice that doesn't necessarily use the store versioning support (often it doesn't). The app pings to a URL to check if it indicates a new version and notifies the user accordingly.
I intend to write a tip of the week about it in a couple of weeks.

How to raise the notification level of timeline updates?

Are there options other than DEFAULT for the notification level?timelineItem.setNotification(new NotificationConfig().setLevel("DEFAULT"));
I would like the screen to turn on to show my new/updated card instead of just hearing the sound and having to quickly turn the glass on to catch the notification or have to scroll through to find it.
There are only two notification levels: DEFAULT and NULL.
The Glass team has decided against allowing developers to use the Mirror API to automatically turn on screens. There was a feature request that the team closed. Here is the explanation:
This is something that we've considered, but as it turns out, it's really distracting. We're continuing to experiment with ways to make notifications rich, but bringing the screen on automatically is probably not something that we'll ever provide in the Mirror API.

How to integrate payment gateway in applications created using javascript frameworks like ExtJs?

Our application is a one-page application created using ExtJs. For any user action, the browser tab is never reloaded and all the actions are performed using ajax. A user can open/close multiple ExtJs windows/panels within the same browser tab, and this way everything remains confined to the same browser tab.
Now, we need to integrate payment gateway in the application, which involves redirecting the user to the bank website and having her brought back to our application.
The issue is that when browser redirects the user, then all the application javascript code along with panels and windows get destroyed, and when the user comes back to the application then she finds it to be different from one she left.
As a solution to this, we were thinking of using following two appraoches:
Option 1. Maintaining the state of application - When user leaves for the bank's website then somehow we maintain the state of application - like which windows are opened carrying what data, which variables have which values etc.. and when user returns back, we generate the same application state for her.
Option 2. Have a browser pop-up window for payment gateway - We intend to provide a button which will open a small pop-up window carrying the transaction details, and in this pop-up window the entire payment gateway process will take place taking care of redirection and everything.
Option 1 is proving to be very cumbersome and complicated as maintaining the exact state is not getting feasible.
For Option 2, we are not sure if this is safe and possible?
Has anyone implemented such an approach earlier. Otherwise, what are the other options which we can go for?
Thanks for any help in advance.
I faced the problem and I implemented it using websocket/polling in the main application while a new window pops up for the payment.
After the payment is successful the main application will be notified.
That way each payment runs in it own sandbox totally unbound from the main application which makes maintenance quite easy. Note that our backend create a new session for each payment using the existing one.
I think it is not uncommon to open new windows for payment that's why I decided to go this.

Resources