I am building an application where I would like to have a heart rate over a certain threshold trigger and event. I'm wondering if there's any way to do this by using data retrieved by another app on the phone (heart rate app) in my own application. I would rather not have to build a heart rate sensor from scratch!!
For example, using data from an app like this :
https://play.google.com/store/apps/details?id=com.macropinch.hydra.android&hl=en
Can I even do this? Or do I need a developers permission, or is the data output to files on the phone I can just read?
This is already discussed in another thread. Threre are mainly two methods, one is contentprovider and the other is sharedpreferences. But app that provides data should implement those. Data sharing between two applications
I'm wondering if there's any way to do this by using data retrieved
by another app on the phone (heart rate app) in my own application
If other application is providing remote service (look AIDL) then your application can call that service to achieve functionality.but AFAIK Cardiograph doesn't provide such service.
Or do I need a developers permission, or is the data outputted to
files on the phone I can just read?
The only option i see here is to obtain Souce Code for that obviously you need to contact developer :D
If this application is outputing data on SD card then you can read it.
Related
I tried using a Android phone to cast to Chromecast device by Youtube app. I added some Videos to queue, then I used another phone to cast to Chromecast device. The second one automatically knows the videos added to queue on the first one.
I don't know how Youtube app can do this?
EDIT I guess Youtube app uses one custom data channel besides Media channel. When Video is added to queue, sender app will send somethings (eg: videoId) to receiver. Receiver will save it in array of video ID. When another phone connects to Chromecast device, It'll receiver array of video ID from the receiver. Can anyone give other solutions? Thanks
I guess what you are asking is how you can create a play list, potentially shared by multiple devices. If that is the case, you have a couple of choices:
keep the playlist in the receiver: this is the simplest option. This will be a simple array on the receiver, kept in memory, which will go away when application ends. A custom receiver is required and it can implement the methods such as "append, insert, get, clear, ... to provide what the senders need. When each sender connects, it can ask (calling 'get' for example) for the current "queue" and then can modify the queue by other methods such as 'clear', 'append', 'insert', .... Note that there is no long-term persistence on the receiver (local storage is available but will be cleared as son as the app is gone).
keep the playlist in the cloud: you need to do most of the things that you do in the previous option but you also persist the playlist to the cloud; the advantage is that playlist lasts beyond the life of a session (this may or may not be desired). In addition, sender apps can potentially get the playlist fro the cloud directly, if needed.
The important thing is that the main storage for your playlist is not your sender devices; they don't know (and shouldn't know) abut the presence of other senders in the eco-system.
On the receiver side, we recently published a simple sample that sows how the notion of (local) playlist can be implemented; that is a simplified example but is enough to show that with minimal work, you can take advantage of the Media Channel; for more sophisticated handling of a shared queue, you definitely need an out-of-bound channel/namespace to handle all the additional api's that I mentioned above.
I am currently working on a GPS tracking App for track packages and parcels right from android smart-phone.
After user finishing put their tracking nO., I would like to be able to analyses this data and find their item information.It also can be track location on GPS to view current location in map-view.
-What would be a good way to smooth the track?
I know that I'll need to implement the tracking in a service, and probably show a notification to user for to easier to know thier item have arrived.
-I have read : Create an Android GPS tracking application
and
https://code.google.com/p/open-gpstracker/
-and also, what is the best way to do connect GPS tracking information with the user data that already have in the website?
like my refr.ex :https://play.google.com/store/apps/details?id=br.com.tribotech.trackpack&hl=en
Firstly, you need to know the API of the package carrier you intend to track packages for. Package carriers always provide an API for programmers to get information about parcels.
Examples
UPS: https://www.ups.com/upsdeveloperkit
NZ Post: http://www.nzpost.co.nz/products-services/iphone-apps-apis/tracking-api
etc..
Then write your app to use these API's. Some carriers may provide a GPS based tracking system, which is what you want for your tracking thing.
I've been searching and I couldn't find a topic that could clarify me 100%.
My question is: How can I launch an android's app preferences activity (from Contacts, Messages, ...) on my own app?
I give an example:
Imagine I'm developing an app which allows the user to quickly access to Message's Settings. I don't need to send or receive any information, I only need to open the activity, create a shortcut for it.
Someone knows if this can be done and even opening specific locations of the apps?
You don't need to know any specific locations or specific apps for these actions, simply look into Intent.ACTION_PICK.
Picking a Contact: get contact info from android contact picker
Picking a picture: How to pick an image from gallery (SD Card) for my app?
The best answer in this thread has the solution:
android: how do i open another app from my app?
Also check:
http://android-developers.blogspot.com/2009/01/can-i-use-this-intent.html
To open settings, you can try:
startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS, 0));
There is no difference in writing in code an Explicit Intent which will go to a specific activity of your app and using the same format to go to a specific activity some other app. A few things to be aware of: (1) The receiving activity may be expecting particular data and fail otherwise. (2) The standard apps you are considering like Contacts, Messages while you can find the source for them in the Android Open Source Project (AOSP) may be changed by the manufacturers so that the activity names and necessary extra data could be different.
In order to maintain as much compatibility between all of the different Android manufacturers, you should stick to the standard implicit intent with the appropriate action/data.
I wonder is it possible to not just simply launch an Android app (which we plan to develop ourselves allowing for that purpose) by having the NFC signal include some parameters and pass such parameters to the Android app via NFC so that, dependent on the parameter passed, e.g. a certain part of the app is accessed and/or the opening app automatically reads and saved the chips serial number?
Are such a more advanced features possible using NFC is is it limited just to "launch that app" and that's it?
THANKS A MILLION
Yes it is possible. You can define several criteria for launching the application. Once it is launched you can process in by the application code complete NDEF message.
It won't make any sense to start the application without passing the data - in such a case you will need anyway read the NFC tag or receive the NDEF over NPP/SNEP after the application will be started, so it is logical those information are already passed to the Intent.
BR
STeN
You should have a look at the Android Application Record. Placed it within an NDEF message, you can additionally add an External Type Record or some text-, uri-, or mimerecord depending on your needs. I have put together an NFC Eclipse plugin which should get you started.
I can start my application by simply putting the phone on a NFC-tag. But I would like to take the idea one step further. Imagine a simple time-tracking application with two NFC-tags. The first will start (and download) the application and register a starttime. The other will also start (and download) the application, but register a stoptime.
My problem I'd like to solve is that I don't want my phone to know about these tags. The application should not need to have a list of tag-ids programmed and know what actions that is connected to each id. The tag should carry the information needed to start the action on the phone with the correct parameters.
Are there any information about how to accomplish this scenario? I have installed "nfc-eclipse-plugin" but doesn't understand how to use it to get my goal and even less how to get my application to read the extra data.
Thanks in advance
Roland
Your tags should be capable of storing NDEF messages. Such messages are automatically read out by Android and passed to your app in an Intent. Automatically installing and/or starting your app can be accomplished by putting an Android Application Record in your tag. Any additional information ("start" or "stop" indication) can be stored in a proprietary record.
You probably want to put the AAR as the last record of the NDEF message, as it is detected and acted upon by Android automatically, but is only supported since ICS. To make automatic installation work with Gingerbread, you can put an additional URI record or SmartPoster record with a Google Play Store link in it as the first record of the message. Your app should then filter (ACTION_NDEF_DISCOVERED) for this URI, so it will also start automatically on Gingerbread.