Smartwatch Access - sleep

I'm currently working on a project which needs access to sensors from a smartwatch. However, is it possible to get access to know whether the user is sleeping or not at the particular moment?
Edit: http://developers.google.com/fit/scenarios/read-sleep-data
Can anyone help me find the variable which actually records the sleep factor in the above link? Anyone acquainted with smart watches and their science?

Related

How can I redirect the customer to the checkout page?

This topic has been discussed many times in the forums. However, I couldn't come to a clear conclusion. I couldn't find a clean answer.
I bought a new modem. I am connected to the modem with my computer. A configuration page immediately appeared on my computer. I was asked to make settings on the modem. The same thing happens when connected by phone.
We do not use hotspots. We use PPPoE.
We sometimes limit our customers' service. In such cases, we want to direct the customer to the payment page. We want our customers to see why the service is restricted.
Is there a practical way to do this with Mikrotik? Or do we need to set up a server other than Mikrotik? Or can we not solve this with radius? I am looking for a practical and easy solution. I am looking for an efficient solution. Can you give me information?
Thanks...

Security problems with server

guys I just want to ask a couple of questions about security problems, if this is not the place to ask these questions then please close the question.
I want to make a web application with Laravel where u can watch movies (it would be used only by me and a few friends of mine). I'm going to turn my old pc into a server and use it for the app. My questions are: (if the answers are too long then please provide a link where I could read about this).
What can a hacker do if he hacks into my server (don't care about data that much since there will be no personal information inside of it) and how to prevent it? Keep in mind I don't want to pay for any firewalls if it's not absolutely necessary.
if the hackers gain access into my server and the server is connected to my router. Can he gain access to the router and then other devices connected to the router. How can I prevent this from happening?

Create Tickets through Square Connect API?

My company (which does Tutoring services) recently transitioned to Square for their Appointments and POS and I am trying to automate certain tasks. I wanted to know if there was a way to create "Open Tickets" for transactions through the Connect API.
I went through the documentation and couldn't find anything that refers to "tickets". I checked the seller community but wasn't satisfied with the answer from Square since they seemed to not understand what "Tickets" meant. I have provided more details at the end of this post in case someone wasn't sure about "Tickets" here as well.
I believe currently Tickets are only available through the Square POS app (Android/iOS) and not on the Web Dashboard. I would like to be pointed in the right direction in terms of what I might need to look at in order to get access to automatic ticket creation.
For more details, please read on.
In order to clarify what I mean by "tickets", here is Square's page regarding "Open Tickets". They are basically a way to create and save transaction info ahead of time so customers can be charged quicker. The way we use "Open Tickets" is we create tickets for Tutoring sessions every day in the morning and when a customer shows up, all they have to do is look up their ticket and pay. We do this since we expect a lot of traffic every day and we want to streamline the process as much as possible.
Therefore, our admin staff ends up creating 80-100 tickets manually every day! I wanted to know if there was a way to automate this. I already have a running Google Sheets with all appointments data that would be needed in order to create a ticket. I just need to find a way to communicate with ticket creation.
I apologize if this is a long post. I tried to be concise but thorough. Please let me know if there is any detail that I missed. I appreciate any help!
Unfortunately, Open Tickets isn’t currently available for Square’s API. Square's API is only able to track completed transactions at this time.
We are constantly improving the product based on feedback like this, so I’ll be sure to share your thoughts with the API team.

Script to run at first logon in OS X to "call home"?

I sell Macs and i'm looking for a way for our security and to combat purchase fraud to have the machines phone home the first time they are booted up to show that machine has been in use at the clients IP address.
Now I know the client might set the computer up at a location other than their home and could spoof their IP (although the potential scammer wouldn't realise this system was in place so wouldn't be expecting to do this) but any system is better than no system.
In terms of privacy we'd put it in our privacy policy but of course we're not looking to collect any information from the user apart from their IP address and the script should delete once its connected to the internet for the first time.
How would users recommend the best way to do it? I have full access to the computers before hand and we already launch a script on first boot of user account to show a welcome and help guide - so we could add simple scripting there, but maybe a helper program which attempts until internet connection is first established, makes contact and deletes itself is best.
And of course we'd need a two pronged approach, a URL or API of some sort on our server that the computer connects to. Ideally the information to send would be the serial number and the IP address of the user, the MAC address could be useful too - as often if fraud has been committed the police will also check to see if the original MAC address of the system has connected via the ISP server logs.
I suppose the final piece of the puzzle would be that our logged data would somehow need to prove it was sent from that computer and not just generated ourselves in a database (eg we haven't just pretended its connected from their IP we've picked up from an e-mail address or something) i'm not sure if there would be any secure legal way to do this?
=============
Edit: Thinking of ways to make it legally binding in terms of presenting the information to the police or the courts I think the receiving server would need to be hosted and maintained by an independent third party whom you had a contract with and didn't allow you any write access to the information what so ever, all you could do is visit a website and pull up the data to pretend the evidence to the police.
(I seem to have been voted down because someone likes committing fraud?)
I have looked into similar solutions for macbooks in the past with little luck. One thing I have found however, if you have a web server, is to create a php page in an obscure hidden directory that will capture the ip address and send an email on access. From here you can create a page specific to each computer with MAC and serial number and set this as safari's homepage in a different tab. So every time someone attempts to access the internet you will be notified.
(This php page can be a simple blank page that just looks like a new tab, or can even display warnings such as "You are being tracked")
You could also create a python script on startup to send the information you are looking for such as ip, mac and serial number back, but again you would need another server setup as a listener.
And lastly, if possible, create a business account in icloud and use Find My Iphone/mac. This is probably the easiest if you can get away with it but unfortunately will not provide you with instant notifications.
-M

WP7 send toast from one device to another

Just wondered if it was possible to send a toast from one WP7 phone to another.
Example of use:
User A presses a button on their phone to alert other users driving nearby with status "empty" that they are needed at the GPS location of User A
If anyone can provide some insight on if this is possible, and how it can be done, it would be great.
Thanks,
Can you?
No.
If I understand your question correctly, no it is not possible.
I understand your question to be "can I do this without having to implement something on a server somewhere?" And the answer to that is unfortunately "no".
What you will need to do as #softarn and #MrMDavidson alude to, you will need to implement something on the server.
But why not?
The reason for this is pretty simple. IF it was possible to do this, then it would open the door for abuse. Imagine if, without having to go through a Microsoft server, I could write a bit of code that would send push notifications constantly to all my users (who had downloaded my app of course). What happens if my users are on data plans that charge per bit? Well I've just screwed over a whole bunch of my users, and not only are they upset with me, they're upset with their stupid phone. Alternatively, what if Microsoft wants to give all windows phone users the option to get push notifications only every 15 minutes instead of immediately? Well, without operating as a go-between, Microsoft would be entirely unable to provide such functionality.
Here's how to fake it
So, in order to interact with toast notifications, it's a requirement that Microsoft gets to play middle man, so if needed, they can pull the plug on / monitor / regulate toast notifications on behalf of the user.
If you wanted to implement a bit of server code that emulated this behavior, that is certainly possible. As #MrMDavidson says, you'd basically need to take the following steps in the architecture of your app:
User's GPS location changes
WP7 app contacts a server that you own, notifying it that the user has moved
Your server code makes note of this, storing the data in a SQL database
After storing your new location, the server scans the SQL database for all other users of your app who are "nearby" and have their status set as "empty"
For each of the users in the database that match the criteria of being (a) nearby, and (b) having an empty status, the server code calls the user's "channel uri", sending the desired message
To your users, it's all the same
This would effectively accomplish your goal, and from the perspective of users, the experience would be seemless, and for all intents and purposes it will appear as if they got a notification directly from another user's phone.
Hope that clarifies things, I did assume you're familiar with the general workflow of sending Toast Notifications.
Happy coding!
Provided that User A's phone knows the push notification URI for User B's phone then, yes, you can send notifications from one phone to the other. However the question becomes; How do you distribute User B's notification URI to User A's phone? You'll either need an "offline" mechanism (email, for instance) or a server to act as a central repository. You're probably better off having a service layer over the top of the push notifications though to manage user-to-user relationships. Then User A's phone can say "Tell my friends that they're needed!". This can be an async-fire-and-forget call to your server. Your server can then implement retries and parallel execution to notify all User A's friends that they're needed at the location.
Yes of course it is possible. Read on to how push notifications work, though I don't think it will be as easy as you think. You'll need (I think) a server that the phones communicate through.

Resources