First a fall i would like to tell you my rating in blackberry is very very poor.
now i am trying to learn gps application.
How to start a GPS application for BlackBerry?
I'm using Blackberry 7.
Could you suggest any working sample application or any link?
Hi following information useful to you
if you want to study following information from directly site you can click this link
Sample application details
some more useful information you can get from here
https://stackoverflow.com/a/7673953/914111
Note: in case above link fails please read same information here,otherwise please ignore following information and go through above information
Simple Location API, as the name suggests, is a simplified version of the Location API packages available on the BlackBerry® development platform. This API is built on top of the existing Location APIs and offers a simple, worry-free but feature-rich API that will hopefully allow the developers to focus on their application instead of spending a lot of time on the complex details and corner cases of standard Location APIs. The source code of this API is now Open Source and can be downloaded along with a demo application from Github: https://github.com/blackberry/Samples-for-Java/tree/master/Simple%20Location%20API
NOTE: The API supports BlackBerry® Device Software 5.0 and onwards and has preprocessor statements to leverage BlackBerry Device Sofware 5.0 and BlackBerry® 6.0 features. To use this API in 5.0, the code snippets enclosed in //#ifdef BlackBerrySDK6.0.0 and following //#endif must be removed. Similarly, when targeting BlackBerry 6.0 and later, the code snippets enclosed in //#ifdef BlackBerrySDK5.0.0 and following //#endif must be removed. If you are using BlackBerry® Java® Plug-in for Eclipse®, the preprocessors should be automatically taken care of by the IDE based on your selected BlackBerry® Java Runtime Environment for the project.
Simple Location API features:
Simplified with a focus on real world usecases. Consists of only two classes.
Worry-free location API that leverages on-device GPS and RIM's Geolocation services.
Dynamically detects available and supported location modes on the device before trying any of them.
Chooses the best location mode based on the modes available on the device.
Built-in retry mechanism with dynamic delay (to save battery) based on a retry factor set by the API user.
Performs both single or tracking location fixes.
Simplified events via SimpleLocationListener interface.
Capable of starting, stopping and restarting tracking session in a reliable thread-safe way.
Designed to eliminate/reduce misuse of location API
Examples:
Single location fix in default mode:
try{
simpleProvider = new SimpleLocationProvider();
} catch(LocationException le){ // thrown if the default mode MODE_OPTIMAL is not available.
...
}
BlackBerryLocation location = simpleProvider.getLocation(120); // 120 seconds timeout
Single location fix in a specified mode:
try{
simpleProvider = new SimpleLocationProvider(SimpleLocationProvider.MODE_GPS);
} catch(LocationException le){ // thrown if the selected mode (in this case MODE_GPS) is not available.
...
}
BlackBerryLocation location = simpleProvider.getLocation(120); // 120 seconds timeout
Tracking session in default mode
try{
simpleProvider = new SimpleLocationProvider();
} catch(LocationException le){ // thrown if the default mode MODE_OPTIMAL is not available.
...
}
// Location fixes will be delivered to simpleLocationListenerImpl (an implementation of SimpleLocationListener) every 6 seconds.
simpleProvider.addSimpleLocationListener(simpleLocationListenerImpl, 6);
Tracking session in a specific mode
try{
simpleProvider = new SimpleLocationProvider(SimpleLocationProvider.MODE_GPS);
} catch(LocationException le){ // thrown if the selected mode (in this case MODE_GPS) is not available.
...
}
// Location fixes will be delivered to simpleLocationListenerImpl (an implementation of SimpleLocationListener) every 6 seconds.
simpleProvider.addSimpleLocationListener(simpleLocationListenerImpl, 6);
Related
I am trying to get geolocation in my Xamarin Android app using LocationManager.
When i used GPSProvider as the location provider, OnLocationChanged didnt execute. Then i tried NetworkProvider and OnLocationChanged did executed and i could find the geo location.
What is the difference between GPSProvider and NetworkProvider and which will be more reliable?
GPS might not have given you any location, because when you are indoors, the signal can go from very bad to unavailable. Use FusedLocation as it manages the providers and will use the one that gives the best location at any given time. If you are indoors, it will use the Networkprovider. If you are outdoors it will use the GPSProvider
If you don't wanna use FusedLocation (needs google play configuration) you can try GetBestProvider then the device will select the best provider for a criteria
Documentation and code sample here
I am new To Intelxdk and want to know whether I can achieve the points.
Handle limited/no internet connection case
Upload file from file manager to the server
Sqlite connection, execute queries(select,add,...)
Navigate between screens using variables(Ex : user_id)
Apply UI design, and handle multiple resolutions for each platform
Download file from server to device
Use maps for a given longitude and latitude
Swipe images by fingers
Package the app for Android & iOS
Push notification configuration
Capture image from camera, save it, and upload it to server
Share text to social networks(Facebook,Twitter) using their apis
Share text to social networks using intent
Call XML webservice, and parse response
Call SOAP webservice, and parse response
Handle device rotation(landscape)
Sorry for big question,
anyone who has any details about all or one of those points. Please let me know,
I will be grateful.
I've also answered this on our forum...
Please see our demo apps and documentation for answers to your questions. I'll try to provide some quick answers below.
Many of your questions presume the XDK is providing platform services -- please note that the XDK provides debug and build services that put your HTML5 code into an embedded webview (an embedded browser window), where many of the features and functions depend on what is available in the embedded webview. This embedded webview container includes JavaScript API "extensions" that provide access to device resources that you normally would be restricted from using in a standard browser, such as access to device features and contacts, but, in general, if you can do something in a browser you can do it in the webview.
Also, keep in mind that the resources available in a webview on a mobile device (memory and CPU) are much more limited than what you are used to on the desktop browser. The desktop browser has nearly unlimited resources, that is not the case with a mobile device. You must design your app to be "lean and mean" for best results. Do not include large numbers of CSS and JS files, especially if you are only using one or two elements within those included apps.
1-Handle limited/no internet connection case
An XDK apps does not require a network connection. If your app uses a network connection it is up to you to determine the behavior when there is limited or no network connectivity. If you only try to access the network when the network is available...
2-Upload file from file manager to the server
There is no such thing as a "file manager" on a mobile device. How you locate and upload files is very device dependent and how you choose to upload them to a server is also up to you to decide. There are standard HTML5 techniques and a few APIs that can help.
3-Sqlite connection, execute queries(select,add,...)
Again, this is device/target platform dependent, it is not dictated by the XDK.
4-Navigate between screens using variables(Ex : user_id)
In general, we advise against using multi-page apps, due to JavaScript context changes, inter-page reload times and resource requirements. Single-page apps that use hidden divs to represent multiple pages tend to work better in this environment, especially if you are new to writing such apps.
5-Apply UI design, and handle multiple resolutions for each platform
Again, this is completely under your control, how well you can master things like media queries and such. The App Designer tool can help you tremendously in this regard, but it is NOT required. If you have your own layout tools you can use them and utilize the HTML/CSS they generate in your project. Or, you can write your layout by hand. For example, if you like to use Zurb Foundation as a responsive web design tool you can use it here.
6-Download file from server to device
Again, what you can do with that file when you get to the device is platform dependent.
7-Use maps for a given longitude and latitude
Not XDK dependent, use whatever network mapping service you prefer. You can get Lat and Long numbers by using the geo APIs that are extensions to the normal webview.
8-Swipe images by fingers
XDK does not dictate how you handle touch events, this is up to you to design how such events and actions are handled.
9-Package the app for Android & iOS
We provide packaging services for Android, iOS and several other mobile targets.
10-Push notification configuration
There is a push notification service built-in from AppMobi. However, we are moving to a 100% compatible Cordova contain that will allow you to (in the near future) include any push notification service that has the appropriate Cordova plugin.
11-Capture image from camera, save it, and upload it to server
There are APIs present for such actions.
12-Share text to social networks(Facebook,Twitter) using their apis
These can all be done using standard HTML5 programming techniques and do not require special services from the XDK.
13-Share text to social networks using intent
Intents depend on the specific platform.
14-Call XML webservice, and parse response
Use your favorite JS library to parse XML data, the XDK does not restrict this.
15-Call SOAP webservice, and parse response
Again, if you have a favorite JS library to parse SOAP data, the XDK does not restrict your use of such a library.
16-Handle device rotation(landscape)
Events are present in the standard webviews (precise behavior varies by platform) to help you deal with rotation.
I cannot scan more than one page each time I start scanning. I use Delphi 7, DelphiTwain and Win 7.
Scanning more than 1 page is a process related to the scanner or the code of the Twain? I use for scan an HP HomeOffice 4600.
I think the software of the HP does not allow multiple pages. The Twain could solve this problem?
I'm trying to adapt an example "Simple Example" that I found in the ShowCases of the page "http://delphitwain.sourceforge.net/".
From TWAIN you can control whether to scan from flatbed or auto feeder. And if ADF, how many pages you want to scan per session. Related TWAIN capabilities you can check:
CAP_FEEDERENABLED
CAP_AUTOFEED
CAP_XFERCOUNT: Number of images the application is willing to accept this
session
You can refer to the TWAIN specification here.
My app is using the "Location significant change" feature. I noticed that after compiling my app to run on iOS 6, the location update method is not getting invoked as often as on iOS 5.
I did some search on Stackoverflow and I noticed some advice to set the value of CFBundleDisplayName in plist file. However, the issue here is that the location update method does get called, only not as often as it used to. Hence, app accuracy has gone down.
Has anyone had any experience with similar issues? Any advice?
There could be different reasons for this
Significant change service uses device’s cellular radio to determine the user’s location and report changes in that location.
If you do not have proper coverage then it would not be called
It gets called based on significant change in distance. So If you have not moved enough it may not be called as you might have moved more in previous testing
In case of significant change service do not expect to get very accurate data. If you want accuracy go for standard service. But there you need to compromise on battery usage.
hallo,
I have a common question, I hope it is ok to ask it here.
I have a project, where I should develop a small appliation for BlackBerry. I know Java ME is the platform to do that (Browser and Widget are other opstion).
What I need to do is a samll application which pops-up after every call and asks the user if he wants to save(assign) this conversation (only the duration in minutes of the phone call is important) in his time-tracking database. He can click NO, but after it, he can start my application and see all unassigned phone calls and still he can assign them in the time-tracking db. This should happen offline and than be synchronized with the server via online connection.
My question now:
What APIs are to be used, for handling with the phone-calls?
Are there some downsides in this kind of application, which I newby can not see at first?
What about the different devices?
Thanks for any information you share with me, to help me avoid common newby mistakes!
Thnaks a lot.
That should definitely be doable, look at the PhoneListener interface to check when the phone call disconnects. What I would do is write the application as a system module, that will run in the background on startup. You can use an alternate entry point so that when the user clicks on your icon the application will create a GUI.
Edit: By the way BlackBerry uses an extended version of J2ME. You can ignore all the RIM specific extensions if you want and develop an app that will (theoretically) work on any J2ME device but you won't be able to use a lot of nice features including the PhoneListener interface. I doubt you'll be able to create this specific application with J2ME alone.