How do you acquire usage data from a webOS app and store that data remotely? - webos

I am new to webOS development. I have one app in the app store and in the next update to the app I would like to be able to identify the age of users, their location, how long they use the app, which features they use the most/least and then store that data in a database. How do I do this? Many thanks in advance for your help.

Well, that's a pretty big question. Here's an outline of what to do, with some notes.
First, you're probably not going to be able to get age unless you ask the user directly and they tell you. Also, you're only going to get location if the application is location-aware and the user permits you to collect that data (when you install a location-aware application, it asks the user if they're okay with the fact that the application will be able to get their location).
As for how long they use the app and which features they use, that's easier. Depending on the granularity you need/want to capture, you can just record time stamps when a user starts and stops using a particular feature, such as when scene activate and deactivate methods fire. As long as you store feature name and timestamp, that should give you what you're looking for.
Then comes to question of collection. However you store it in the app, you have a couple of choices for how to get it out of the app. Unless you can get your users to just email the data to you, probably the easiest thing to do would be to create a web app (possibly with no user facing output, since you're just using it to collect data) using something like Google App Engine that gives you a URL you can send a POST request to using an HTTP request. Depending on how you set it up, it could do the request every time you collect a timestamp (bad for battery use, though), just occasionally, or only when the app is doing cleanup (possibly a problem if you don't get the request off in time).
I'd recommend taking a look online at how people do this type of thing in iPhone apps to get a good sense of how to do this type of thing. If you hit problems getting particular things to work, you can of course come here to StackOverflow with specific coding questions.

Related

What do I need to make a website that references a table of anonymous users to notify using SMS?

This is a project I'm working on for use between people at my university.
The idea is simple, it's a website where people can submit anonymous comments to other people based on a unique identifier, which is just a random number. People sign up with their unique identifier and their phone number, which would be saved together. Other people hop on the website and submit a comment with the unique identifier, which is sent via SMS to the corresponding phone number.
Conceptually I feel like this should be easy, the website just searches a table for the identifier and then uses an SMS API to send a message to the associated phone number. Also dynamically adds new lines to the table as people register.
I am real new to web development (if you couldn't tell), but I'm not afraid of a little code so I'm figuring it out. My problem is I have no idea big-picture-wise what building blocks I need to connect together. I think I found a good service called Twilio for the SMS API. I think I need to pay for web hosting, but do I need to rent server time? It's a real simple operation but the data also needs somewhere to live. I want it to be a long-term installation so I don't want to host it myself.
I would be very grateful if someone could real quick make a shopping list of the components I need to make this happen, or just any other tips if you've got 'em

How to send a welcome onboarding message in Slack app

I want to send a welcome message to a user that adds my Slack app.
This is considered good practice in the official Slack docs.
What is the right way to implement this?
Should I use the app_home_opened event for that? Is there a built-in mechanism to detect if it was triggered for the first time (because I need to show the onboarding message only once)?
Are there any other events that might be useful for the use case?
Yes. You should use the App Home features on your app. Enabling the app home with some type of instructions or welcome message would be best practice. Along side this, you will subscribe your app to the app_home_opened event type which will let you know whenever a user opens your app's app home. You can then configure your app to respond to these events. Here's a video that might help with this concept.
After #sandra's response and further investigation I would like to share more details on the implementation mechanics:
A user goes through the OAuth process and is then redirected to the app home.
In the application I catch the app_home_opened event.
If the event.tab === 'home' and event.view is not set, it means that the app home is opened for the first time and we need to send the welcome message.
Send user a message (e.g. in the Bolt for JS it's await say('Welcome!')).
Publish the Home view (e.g. in the Bolt for JS it's await client.views.publish(...)).
Useful links:
Official video from Slack about App Home
Official demo app to get some ideal on implementation
Give them a warm welcome on Day 1
Make new hires feel at home with a quick tour of the place. Using integrations like onboarding assistant Greet Bot, you can automate welcome messages and reminders, and share helpful links and documents.
The ideal welcome isn’t only a nice-to-have. It’s a critical early step in the onboarding process that shortens ramp time so your people can get to full productivity fast.
2.Create #new-hires channels
When new folks join, give them a place to find answers to FAQs, access important documents, and meet other new starters. If you’re hiring on a large scale, create multiple channels to bring together all your new hires from specific time periods.
This will boost productivity and can be great for employee engagement. Your new hires will be able to meet their peers and find the essentials fast—not just company policies but recommendations for the best places to grab a bite too.
3.Make sure they hit the ground running
When you need to bring new employees up to speed on a project, one approach is to forward them a load of email threads and wish them luck.
A better way is to invite them to a project channel where they can easily find what they need—pinned posts and files, team members, and conversations—all with a scroll or a search.
4.Help them help themselves
No one wants to feel like a burden when starting a new job. Enable self-service to help new starters get answers for themselves. As an added benefit, it’ll take some heat off your HR team because they won’t have to deal with so many admin requests.
Slack integrates with the apps your people use the most to stay productive and keep on top of HR tasks—apps like Dropbox, Salesforce, G Suite, Workday, Okta, UltiPro, and more.
5.Remind them about the important stuff
You can schedule automated messages to arrive at key times, prompting your new hires to complete the next item on their onboarding checklist. No more missed deadlines, no more time spent chasing people down. Just new employees getting up to full productivity—and full confidence—as quickly as possible.

Is it possible to Fetch Real-time data using Riot Valorant Api?

I am making an application that shows real-time status for a Valorant game. like players alive, the type of weapons each play has, time remaining, etc.
Is it possible to use Riot Valorant API to do this for live matches or for previously played matches?
As per my knowledge you couldn't. But I think you should try with Riot Games' official production API, not development API.
Let me know if you find something relatable.
(This is adding onto Sanskar's answer, which I cannot comment on as I lack the required 'reputation')
I'm aware that this is an old question, but for anyone who happens to have stumbled upon this question, there is no way to obtain real-time in-game events however, there is a way to retrieve certain data from a match-- only except, not in an official way that does go against Riot Game's TOS of using third party software. Though, I wouldn't worry about this too much as long as you do not ruin the competitive integrity of the game by providing yourself with an in-game advantage over others in the game. I personally have been using this for over a year now and have not received any form of punishment for doing so.
Anyhow, back to the actual question of this thread, check out this document of API endpoints that have been scraped through monitoring HTTP traffic of the Riot Client. https://github.com/techchrism/valorant-api-docs/tree/trunk/docs/ You'll need to obtain certain authorization tokens of the Valorant account through whatever methods are available to you (I pray that it is through lawful means :) ), which highly depends on the type of endpoint. There are certain wrappers for these endpoints already made by other users somewhere on GitHub, and you can always ask for help in the small community of developers that are using these endpoints in the README of the GitHub page I sent in this post.
REMEMBER TO NOT DO ANYTHING THAT WOULD CREATE AN UNFAIR ADVANTAGE, OR ANYTHING ELSE THAT A RIOT EMPLOYEE WOULD NOT APPROVE OF USING THIS :)

Instagram Location Data

I am working on developing a platform which is integrated with Instagram. My app is still in the review process currently but would like some clarification on what is the best way to build one of the modules.
An important part of our application involves us selecting the most appropriate user to carry out a task. In order to make this decision, we need to see the demographic information of a certain user’s followers. More precisely, we need to know how many followers lie in each country
The current workflow we have gone ahead with is, by fetching the list of follower’s of a user’s profile, checking any random post on their profile and fetching the geolocation of that follower. This however has lead to inaccurate information.
Can you suggest if there is an alternate to getting this done?
Thank You
There is no accurate way to get location of a user. You can use 2 methods to get best guess:
check the bio information for location
get all photos and get geo location area from where most of the posts are coming from.

Twitter - how to get user's timeline

My app, in one of its parts, should reproduce the same behaviour as a web page, where you can find a section with a table of Twitter posts, I guess they are a user's timeline. I took a look at Twitter api's and I found a call which could return it, but, If I got it right, you are supposed to be authenticated with that user credentials. Is there a way to achieve it without being that user (thus without using that user's credentials)? If not we have to assume that web plugins have more flexibility than queries which return xml, or json? Which kind of approach fits best, considering the app needs to support iOS from 4.3 to 6.x? Does Twitter+Oauth provide more flexibility than direct Twitter api calls?
Hm, if you are looking to just display user's feed you can do it as simple as:
https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=reMakeIn&count=200
Where you change the screen_name to the desired user that you want to show the feeds for.
No need what so ever to use authentication for this.
Not sure if this is what you want to achieve, but I use this approach to show random user's tweet feed.

Resources