Is it possible to create an Geotracking app in WP7 using Bing Maps? - windows-phone-7

Is it possible to create an app like Runtastic, RunKeeper or SportsTracker (all of them Android apps) in WP7 using Bing Maps? Or maybe there is an app with that functionality already out?
These apps basically trace the route you run/cycle/jogg/etc in Google maps, displaying your current speed, altitude, cal lost, direction, etc. Then they have an option for storing the tracks and displaying their related information later. They can display charts as well.
Also, what sensors does WP7 devices have?
The image below is runtastic, tracing the path as you go
Thanks

Yes it's possible. But you should get past the idea stage and into the development before posting questions here.
As for what sensors are available, you can find more information about the minimum hardware specifications here
A WP7 device must, at a minimum have the following:
Accelerometer with Compass
Assisted GPS
Ambient light Sensor
Proximity Sensor
Camera with LED flash
FM radio tuner

It is possible since you can translate existing GPS coordinates to the Bing Maps control. Must of the features Chris mentioned are not required for a geotracking application (those are general device requirements). All that's needed is basically the GPS sensor.
Note one important element - you will not be able to run the application as a background process. Although you can keep it under the lock screen, you will not be able to switch to other processes (only to a very limited extent and under specific conditions).

Related

Using non native camera or gallery

I have a part in my app where users can set a picture from gallery or take it with the camera. The app works perfectly with the native camera or gallery, but with other camera or gallery apps both intents returns null. What I have to do to make my app works fine with non native apps?
Please understand that a negative message is not a fault of the messanger. Let me cite the ultimate answer to a different question here:
there are thousands of possible camera apps -- preloaded or installed by users -- that could claim to support ACTION_VIDEO_CAPTURE, and any of them can have bugs as this one does. There is no EXTRA_PLEASE_AVOID_BUGS that you can pass on the Intent to change that.
This said, check that you are not running into the infamous low-memory condition when you launch an intent. You can find more info and some references here.

Wrist gesture detection on Android Wear based smartwatches: is it possible?

Does anyone have any information to share regarding gesture detection using wrist movements (in contrast to swipe movements on the touchscreen) with Android Wear?
Is there official support for this in the API? If not, do you think this can be enabled via custom ROMs?
Considering Android Wear is... well, Android, and Android has all the API functions to get data from the accelerometer of an Android based smartphone (and lots of helpful development sources), I assume it wouldn't be too hard? Or am I overlooking something?
Someone said the following at http://forum.xda-developers.com/android-wear/development/gesture-detection-using-wrist-t2936656
Use asus remote camera app for android wear. If you twist your watch
it will take a picture with your smartphone camera!
To which I replied:
So wrist gesture detection is perfectly possible it seems? But can you
or anyone else give me some additional background about Android Wear:
Should I see Android Wear as a simple extension of the Android API?
By which I mean: can I utilise all the Android API functions related
to interpreting smartphone/tablet sensor data, provided the smartwatch
has that sensor? (e.g accelerometer)
Since I was looking in this
particular section related to Wearables (Remove the spaces: developer
. android . com/training/building-wearables.html ) and I couldn't find
any information about wrist gesture detection.
Is that simply because
everything else from the Android API is automatically also applicable
to smartwatch development?
(As one can tell, I'm quite new to mobile development.)
So far no answer. I'm now asking here in hope I get an answer...
Wrist gestures were added in Android Wear 5.1 however at the time of this response, Android Wear 5.1 is only available on the LG Watch Urbane. This update is expected on other Wear devices in the upcoming weeks
Two common wrist gestures are interpretted by the system as swipe up/down. You change the speed of the flick either away or towards you.
If you flick your wrist away from you quickly, then back slowly that will cause a scroll down.
If you turn your wrist slowly away then flick it quickly back towards you, this will scroll up.
You can see the wrist gestures in action here - https://www.youtube.com/watch?t=14&v=_R0qbB4hVbU
You can use the IBM Wearables SDK for Android
to record and recognise all kinds of gestures not only wrist
for more info:
https://github.com/ibm-wearables-sdk-for-mobile/ibm-wearables-android-sdk
Disclaimer: I am the author of the articles/code described below.
I just created an Accessibility Service that does exactly what you are describing: it gives you the ability to completely control your smartwatch using wrist gestures.
I created it for my own use (I can only use one of my hands, the one in which I wear the watch) and I can fully control it using wrist gestures.
https://jsalatas.ictpro.gr/handsfree-wear-a-wrist-gesture-input-method-for-android-based-smartwatches/
notice that in the current phase I'm not sure if the model that recognizes the wrist gestures can generalize or if it just recognizes my wrist gestures only.

Genymotion GPS is not getting my current position

As the title says, my genymotion is getting the static position declared in the gps options. Theres another option that I could get my current position? Im using cordova application testing with genymotion.
Genymotion does not plug the GPS position to your computer's position.
If you want to customize your position you can do it on several ways:
Use the GPS Widget (free feature) located on the right bar of the device. You can either set manually GPS data or use the Map view to do it easily
Use the Genyshell (free feature) to script the positions injection.
Use the Java API (paid feature). By including the JAR of this feature you can control the GPS and other device sensors. This feature is very useful to improve code coverage, for unit testing for example.
I was using cordova geolocation plugin.
navigator.geolocation.getCurrentPosition(onSuccess,onError,options);
And I was also facing the same problem, It wasn't working in genymotion. Setting enableHighAccuracy to true worked for me like below.
var options = {
enableHighAccuracy: true,
maximumAge: 0
};
For programming, you could give fake position by using any app. For instance you might use Fake GPS location to give static GPS position.

Location Tracking in Background

I am developing a windows phone app that uses users current location, I am making the app in 7 OS. My question is, Can I track the location in background, that is when the screen is locked?
I know this is a possibility in wp8 as it provides us with GeoLocator class, but can I achieve this in wp7? I am basically making a runtracker app hence I would like my app to track the location even when its in background, is it really feasible?
Your help is always appreciated!!
It is possible to keep the app running under lock screen, as it does, for example, Endomondo app.
Using Idle Detection, you can keep the app on, although screen is locked, and you can keep on tracking the location. Actually, it is not running in background, but in the foreground. Just the screen is locked. So, be careful not to drain user's battery.
You have to set the PhoneApplicationService.ApplicationIdleDetectionMode property to Disabled, for example in InitializePhoneApplication() method in App.xaml.cs:
PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Disabled;
Note that there are special certification requirements for this type of apps. Refer to section 6.3 (Apps running under a locked screen) of the following page:
Additional requirements for specific app types for Windows Phone
I got the same problem in one on my apps..
I don't think it' s feasible for wp7..
Bt if you want to do it with wp8 you can refer following link.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681691%28v=vs.105%29.aspx
And to know about background supported and unsupported API's http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202942%28v=vs.105%29.aspx/css
GeoCoordinateWatcher Class exists in WP7, but here is the documentation from MSDN -
This API, used for obtaining the geographic coordinates of the device,
is supported for use in background agents, but it uses a cached
location value instead of real-time data. The cached location value is
updated by the device every 15 minutes.
More Info : http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202962%28v=vs.105%29.aspx/css

Track Accelerometer under lock screen

Is it possible to track the accelerometer value while under the lock screen?
I managed to write a simple application which counts from 1 up to 100 using a timer which fires an event on which I increment a counter.
But when I use register a handler for the ReadingChanged event of the accelerometer it will not be fired anymore once the screen has been locked. Even if I unlock the screen again I will have to readd my handler.
the msdn documentation tells on the one page:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff941090(v=vs.105).aspx
"Valid reasons to disable idle detection in Windows Phone OS 7.1 applications include ones where core functionality continues while the phone is locked (for instance, an exercise tracking app)"
but the sensor api also tells:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202968(v=vs.105).aspx
"The Sensor APIs cannot be used while the application is running under the lock screen. For more information, see Idle Detection for Windows Phone. The Sensor APIs also cannot be used in background agents. For more information, see Background Agents Overview for Windows Phone"
I hope they will change the api soon, because of that it is not possible to write any good sleep tracking / sport tracking applications ... :(
I was helping a guy with this a couple of days ago. He had an app that tracks GPS and accelerometer data under lock screen.
Turned out the app accelerometer data stopped tracking when under manual or auto lock screen.
There may be an issue here to be looked into.
Under lock screen it is a good idea to minimise power usage... disable all uncessary code, like ui updates. My understanding of one the motivations for idle detection and running under lockscreen being opened up during CTP was in response to a lot of feedback from developers of map/tracking apps that basically need this for their app to be of any use.
I'm not sure of the usage case where you'd want to use the accelerometer under the lock screen.
Apps typically run under the lock screen when you need them to do something when you're not interacting with the device. e.g. playing music or downloading a large file.
If you wanted accelerometer data I'd assume that the device is being held and, therefore, presumably, looked at. Given this, why would you therefore want to run under the lock screen?
That being said, if you had a good reason to do so, you should still be aware that:
when your application runs under a locked screen, it ... must minimize
power usage
(from the Marketplace Certification Requirements.)
In my understanding, reading values from sensors is not minimizing power usage.

Resources