I was in need of a simple way to automatically track the hours that I spent at the office. There are a ton of time tracking tools out there, but I didn't want to trigger a button every time I start or stop working. That's why I created this simple JSON API.
You can find the API on GitHub: https://github.com/Steppschuh/PlaceTracking
I used IFTTT to automatically send requests to the API whenever I connect or disconnect the office WiFi. I've set up some public recipes that you can use here.
The API only serves 3 endpoints:
Users, representing the one who is using the API (e.g. you)
Topics, representing whatever you want to track (e.g. a project or location)
Actions, representing tracking events (e.g. starting or stopping to work)
which are documented in the GitHub repo. Basically, all you have to do is firing 2 requests for setting up a user and a topic:
Code:
http://placetracking.appspot.com/api/users/add/?name=John%20Doe
http://placetracking.appspot.com/api/topics/add/?name=Work
And that's it. Now you can add some events whenever you start or stop working:
Code:
http://placetracking.appspot.com/api/actions/add/?name=start&userId=123&topicId=456
http://placetracking.appspot.com/api/actions/add/?name=stop&userId=123&topicId=456
When you want to analyse what you tracked so far, simply call:
Code:
http://placetracking.appspot.com/api/actions/get/?userId=123
Please let me know what you think and if you have suggestions!
Related
Tasker is a very versatile tool for controlling your Android device. The more I learn about it, the more I want to learn. For that reason, I am starting this thread which I hope will be a place for people to not only ask specific advanced questions about Tasker, but also to show off the tricks and hoops they have been able to accomplish with Tasker and its plug-ins.
Example:
To start the ball rolling, and provide an example of what I think this thread should be about, here is an example of an advanced Tasker profile.
Time Recording Pro has a plug-in for Tasker. Following their FAQ to their Product Help page provides Public App Services and some basic directions for creating a task which (with Google Calendar Sync) will create timeclock-like punches.
Public App Services
'Time Recording' provides these public services for 3rd party check-in and check-out integration.
Broadcast receivers
com.dynamicg.timerecording.CHECK_IN
com.dynamicg.timerecording.CHECK_OUT
com.dynamicg.timerecording.PUNCH
Activities
com.dynamicg.timerecording.activity.CHECK_IN
com.dynamicg.timerecording.activity.CHECK_OUT
Sample setup in the 'Tasker' app:
1. Create a Task
2. Add an Action of type 'Action Intent' (found under category Misc)
3. Set Action=com.dynamicg.timerecording.CHECK_IN, Cat=None, Target=BroadcastReceiver
4. Done.
5. Hit the "Test" button
By creating a context of Cell Nearby (and scanning or entering the cells at a physical location), I have created a task to turn WiFi on, turn BT, Cell Data and GPS off, and record a time-punch to my calendar when I arrive at a site. These tasks are reversed when leaving. This not only saves battery at a site without using GPS, but also automatically records time at a location for Time Billing purposes.
The limitation of this is the time-stamp is fairly generic. I have tried entries in the Extra and other fields of the Action, but not had success creating anything more specific. So it is a very useful context, but has room for improvement.
Challenge:
Another situation that advanced Tasker development would resolve would be overriding the default function of hard buttons on a device. For example, creating a task that changes the default camera app that is launched by long pressing the hard camera button. You can imagine the possibilities are nearly endless for reprogramming the hard buttons, and the potential for problems equally vast. What is needed to accomplish this, however, would be some knowledge of the actions and broadcast receivers similar to those provided by Time Recording Pro. I suspect android programmers might be able to provide some of that information.
Summary:
I hope this thread will start a discussion. Tasker is a very versatile app with numerous plug-ins that offer the ability to accomplish extraordinary control without the need to develop a special app. Whether or not my specific examples are commented on or improved upon, I think there needs to be a better forum for Tasker users to gather and help each other.
Thanks
I'm reviving this old thread in scope of getting some help. As you can see here the list of intents has grown a little bit.
What I'm trying to achieve and can't manage is to get info back to Tasker about the current status of Time Recording.
I presume that com.dynamicg.timerecording.GET_INFO should be called and then wait for an answer on com.dynamicg.timerecording.RESULT, but I cannot seem to get this working.
Thanks!
I don't participate much, but I've learned a great deal from this site. So I'm posting this here as GPL2 software as a way of thanking everyone. All I really ask is that it not be used in a closed-source app without talking to me first.
Can't poast URLs, because I have fewer than 10 poasts (I lurk hard). Mod, if you don't deem this to be spam, would you kindly provide the link (or allow me to do so)?
[sourceForge.net]/projects/webremote/
Basically, this was meant to be a generalized HTTP(S) client, with the URLs being assembled dynamically and under a variety of different circumstances. The server-end of the transaction is a creation of the user.
I wrote this tool to assist me with repititive tasks at work (specifically, asterisk/linux administration). I wrote a PHP page to do things like add users, check server load, trigger recordings and dialplan modes, and so forth.
I have also used it in conjuction with a Raspberry Pi to trigger relays and read sensors in my home from wherever I happen to be at that moment.
There are lots of things I want to do with this app...
Implement GPS, so I can trigger URLs at waypoints.
Tie into NFC and make a bitcoin wallet that you can "bump" or scan a QR code to pay someone.
Implement Trigger packages to support one-click importing of Triggers for a specific task (IE, minecraft server administration)
Use BouncyCastle to encrypt the DB.
Hook into the camera and fire triggers using snapshots (or image files) as arguments.
Actually cause the HTTPS Receivers to validate certificates. Presently it does not (although the traffic is still encrypted).
I will take requests, questions, and bug reports at the sourceforge page, but how fast things get done will directly correlate to how much interest the project attrracts (which may very well be none).
For those learning how to program and trying to learn something by reading the source, I'm sorry.
I've tried to keep things hygenic. I come from a C/Java background, so Android was a bit of a leap, with respect to its organization. This program is a work of evolution.
To check out the source, use subversion:
svn checkout svn://svn.code.sf.net/p/webremote/code/trunk webremote
My working copy is also my Eclipse directory, so importing it with Eclipse should be minimal trouble.
If anyone *really* wants to thank me, I am a bitcoin user:
12rA36FH4NUFZojxyxQgWmQm6WUnzfQ1yR
Or you could buy the version I have up at google play (but I consider this a donation):
Can't poast URLs.... Search the Play store for WebRemote.
Thank you all again for sharing your knowledge.
I want to develop a very basic app.
Main function: Show the value of a cryptocurrency
My problem: I don't know how to get the value of this cryptocurrency from this website and put it on my app. I want it so every time I push the refresh button it gets the newly updated value and prints in on the screen.
Hi,
To get values from a website, you can use a technique called screen scraping. To do that you can use Jsoup. A very good start point is to search for "Jsoup HTML Parser Hello World Examples" and check the mkyoung examples (I can not post links yet).
In order to examine the html you can use a web inspector like Firebug.
Jsoup is a nice library especially since it can handle fetching the document for you (not always desirable though) and has a familiar jQuery-like syntax. I've used it in projects before and it's pretty quick to get going with.
How many times have you forgotten where you had parked?
With this app you will not forget where you parked your car, motorbike, bike or horse...
With a simple and intuitive interface you can save the position where he parked and then get directions from wherever you are.
The application can also save the position of the vehicle automatically when you disconnect the headset, by example.
HOW IT WORKS
A button will appear in the bottom-right of the screen when the location will be fixed with the defined accuracy.
Press the button to save your car location.
When you can re-enter the app it will display the route to your vehicle and, of course, you can save the car location again.
Easier impossible!
PLAY STORE LINK
https://play.google.com/store/apps/details?id=com.ryosoftware.whereismycar
PERMISSIONS
Fine and coarse locations: Required to fix your location
Write external storage: Required by GoogleMaps API
Internet and Access network state: Required by GoogleMaps API and by Ads (in the free version)
Billing and Get Accounts: Required to manage InApp billing
Bluetooth: Required to automatically save current location when BT device disconnected (see app settings)
Vibrate: Required to vibrate when current location saved
Read phone state: To disable voice speech while incall
Only to let us know 2 rellevant dates for this app:
* May 3: I have pulled the app from the Play Store. Active users can use the app but no new installs are allowed.
* June 11: Google Maps API becomes a payment API and developers needs to create a billing account to continue using it. I do not agree with that, so I do not intend to create the billing account. I assume that the app will stop working sooner than later from that date.
Just for your information, I paste a rellevant part of the email that I have received on May 3 from Google...
Code:
Hi,
Today we are announcing important changes, including our new name - Google Maps Platform, a simplified product structure, pay as you go pricing for all, and more. Please take a few minutes to review the announcement to familiarize yourself with the upcoming changes.
We would like to highlight a few updates that may impact your implementation. Beginning June 11th, we are launching our new pricing plan and providing all users access to support. We’ll continue to offer a free tier — all developers will receive $200 of free monthly usage of our core products.
In addition, this change will require you to enable billing and associate it with all of your Google Maps Platform projects. Creating a billing account helps us better understand your usage so we can continue developing helpful products. It also allows you to scale easily with less downtime and fewer performance issues if your product grows beyond the $200 of free monthly usage. For additional visibility and control you can set daily quotas or billing alerts.
HyperTrack is the easiest (and fastest) way to build dynamic location features in your apps.
In three easy steps:
Step 1: You plug a lightweight and open sourced SDK into your app. Add a few lines of code in Android and iOS.
Code:
// Swift and Java
HyperTrack.setUserId("249d26da-c31c-4a70-bab8-53ef164411f0");
HyperTrack.startTracking();
Step 2: Watch your user's location data on a pretty looking dashboard. No code to be written, and did we mention, free to view for unlimited users and usage?
Step 3: Play with the data through events (via webhooks) and actions (via APIs) to build location features in your product within
minutes. All our dashboard views are easy to embed into your own workflow to create a seamless experience.
Code:
<iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="100%"
height="100% src="https://dashboard.hypertrack.io/widget/users/<YOUR_USER_ID>/timeline;action_id=<YOUR_ACTION_ID>?key=SECRET_KEY">
Tell me more
The SDK generates accurate, battery-efficient location and activity data using a bunch of black magic with device sensors, maps and business context. The location data is organized as trips and stops in the life of the user. Useful events are automatically generated along the way and available via webhooks. When actions are performed by the user in the app or expected by the business workflow on the server, they may be posted via APIs.
Unlimited trips, stops and events for unlimited users are free to view on the dashboard. Pay to play with this data and build location features within your product in minutes. To test your integration before deploying in production, we have a free test mode that lets you sandbox the API/webhook integrations with your users’ live data - up to 20 of them.
So What's the Catch?
Thanks for asking. The catch is... there is none. We are offering you the ability to add our location stack to your application and begin tracking immediately, for an unlimited time, for FREE. If you want to begin performing actions, analyzing trips, etc. then we have pricing which you can find on our website (https://hypertrack.io).
Compatibiliy
Hi,
Good to know about this. I wanted to see if this can be used with ibeacon to facilitate the functionality to track locations? iBeacon is a top way to add location based features in iOS and so if this can be used with it then it makes sense.
hnrindani said:
Hi,
Good to know about this. I wanted to see if this can be used with ibeacon to facilitate the functionality to track locations? iBeacon is a top way to add location based features in iOS and so if this can be used with it then it makes sense.
Click to expand...
Click to collapse
Thanks for the reply. This would depend on how you are using iBeacon.
hypertrack said:
Thanks for the reply. This would depend on how you are using iBeacon.
Click to expand...
Click to collapse
Ok, so I will ask my team to test it and shall get back to you incase of any query. Thanks for the response though.