Action:
com.borntotinker.intent.action.MEASURE
Input:
Input the type of measurement to collect
Output:
The result of the measurement collection will be returned. Units and data types will vary depending on the physical information being measured.
An open ended intent to collect information from the android phone's surroundings.
This could be physical information such as spatial measurement, acoustic decibel levels, ambient light levels, vibration sprectrum data, etc.
Comments
MIME type
I think that it'd be more valuable if this were defined as a MIME type instead of an action. That way, you could VIEW a distance (maybe through an app that knows how to visualize distances). Instead of MEASURE, you could use the android.intent.action.GET_CONTENT action instead.
For example, use this for the MIME type:
vnd.org.example.android.intent.measurement/distanceand then for the extras (on an intent that represents the data):
key:
org.example.android.intent.measurement.UNITvalue: string, unit name
key:
org.example.android.intent.measurement.VALUEvalue: float, measurement numerical value
For example, a response like this intent:
mime type: "vnd.org.example.android.intent.measurement/distance"
extras:
{ "org.example.android.intent.measurement.UNIT": "meter", "org.example.android.intent.measurement.VALUE", 30.0 }Re: MEASURE
If the package as namespace distinguishes it from real Standard Intents, then this may be OK.
Otherwise
MEASUREmust be reserved for JSR-275 (Measure and Units) standard by the JCP.Android implements several JSRs itself, so respecting others that are in the pipeline for Java 7, but due to Android's SE nature compatible with it, is in everybody's interest.
Action name?
Hi. Thanks for adding this general intent.
Is this an existing intent? I could not find it in the Android documentation on Intents.
If this is not an intent provided by Google, you should probably choose a separate namespace, like com.yourname.intents.action.MEASURE, in order to avoid future conflict with android core intents. There is also the possibility to suggest the openintents namespace for new general intents, but this should be first discussed in our (new) Intents forum.
Action Renamed
Thank you for pointing that out. No this intent is not provided by Google. For now I renamed it to a separate namespace to differentiate it from the internal Google intents. If there is interest in incorporating it as an openintents namespace I would have no problem with that either.
Where to start
I'm interested in developing an app that would respond to changes in the environment, basically everything mentioned in this module's description. I don't seem to be able to find anything to download though. How would one start? Are there any examples? Have I missed a link, or is this a project that hasn't taken off? Alternatives?
Thanks in advance!
Currently there is no code
Currently there is no code yet, just the discussion.