Skip to main content

Posts

Showing posts from February, 2014

Getting location in Blackberry 10

Location awareness is a required feature in most of the mobile phone applications today. Blackberry 10 API provides very easy way of accessing user's current location. In this blog post we will see how applications can access user location through native blackberry 10 API. Before using Location API you must add following to your .pro file LIBS += -lQtLocationSubset To enable your app to obtain the current position or last known position of the device, you must add the access_location_services permission to your bar-descriptor.xml file like this <permission>access_location_services</permission> Note that Location services must be enabled on device to get the location. We use QGeoPositionInfoSource class to find the location of a device and get updates about its position. To use QGeoPositionInfoSource you must include it like this <QtLocationSubset/QGeoPositionInfoSource> First we must initialize position source. which can be done through  createDe