Check if the offline map available - here-api

I am working on an Android app with Here map sdk, and the MapLoader works fine for me to manage the offline maps, but in case of no network connection, how can I check if a specific map is installed or not ? Because in such case, the app can not retrieve the package lists anymore. Can the app check the device directly instead?
many thanks!

This is currently a limitation of the MapLoader API. It requires a data connection to retrieve the latest catalog. One suggestion is to store / serialize the MapPackageSelection in the application so you can keep the installation state.

Related

Flitter Firebase multi language

I'm developing an application using Flutter and Firebase.
I need to support multiple languages and I was wondering about what is the best solution to do that... Can I keep the strings in Firebase and fetch them without downloading them each time I need?
When the user select a language the first, usually it does not change, but sometimes it could.
Thanks!
I can't understand why you want to use multi-languages feature using Firebase.
In any app at least there are static texts.So at least for that part you don't need the translation stored in the Firebase (performance issue). I suggest to have a look at this package easy_localization : https://pub.dev/packages/easy_localization
Why you should use static translation:
when using non static translation (downloaded from Firebase) :
You have to download the translations : App does work only if connected to network (at least first time or after user clear the cache of the application)
You have to cache the result : using shared_preferences
You have to fetch the translations from cache every time.
If you still insist about using Firebase.You can see a similar question for android (answered by GDE): Firebase Multi-Language support: Is possible?

In Ionic or cordova platform, how to sync and retrieve database from iCloud

I have build an app using ionic framework, and the data uses sqlite database and stores in app /documents folder.
Now I want to know is it possible to sync the database into iCloud, so the user can retrieve the data automatically if they reinstall the app or use a new device.
I did search for some solution, some suggest sync to remote database using such as pouchDB or parse. But as for our company policy, we cannot store app data into any other remote place exclude iCloud.
Any ideas? Thank you so much.
As far as I know, iCloud automatically backs up data on the user's local storage. You don't need to do anything extra.
I might be wrong, but soome people seem to have problems with it doing that
Check out this page
Relevant:
BackupWebStorage(string)
Default: cloud
Allowed values: none, local, cloud.
Set to cloud to allow web storage data to backup via iCloud. Set to local to allow only local backups via iTunes sync. Set to none prevent web storage backups.

How to handle offline mode for Google visualisation in GWT

I have a GWT application that uses many Google maps and charts. I want to have an offline mode where the user have the application installed on his the computer and without using the Google apps, he can continue using the other features.
For now the maps in the application throught a nullpointer error because they cannot initialize. I thought about checking the internet connection in EntryPoint and change the behaviour accordingly, but I am hoping for a simpler solution. Any thought ?
per https://developers.google.com/chart/interactive/faq#offline
You cannot do that:
Can I use charts offline?
No; your computer must have live access to http://www.google.com/jsapi in order to use charts. This is because the visualization libraries that your page requires are loaded dynamically before you use them. The code for loading the appropriate library is part of the included jsapi script, and is called when you invoke the google.load() method. Our terms of service do not allow you to download the google.load or google.visualization code to use offline.
Can I download and host the chart code locally, or on an intranet?
Sorry; our terms of service do not allow you to download and save or host the google.load or google.visualization code
Update
I thinks the terms and conditions are changed now. As you can save and download JsAPI, ServiceBase to use charts offline.
But you still can't make ajax calls :Ajax
Hope it will be available soon, cheers!

What are the steps to bundle Meteor into a client-side-only IOS app

I have tested Cordova as a way to embed a HTML5/JavaScript application into an IOS application without a remote server.
I would like to embed Meteor instead: for my learning, for the reactivity, and so that later I can add a server-side for storing data.
What are the key steps to do this? I would need to use LocalStorage instead of in-memory storage of minimongo. Are there also steps to embed Meteor? Would I also need Cordova to provide a functional environment for Meteor? Are there steps to tell Meteor there is no server?
At the moment its not possible to persist storage with local meteor collections. You can create collections without specifying the collection name e.g
var MyCollection = new Meteor.Collection(); //(instead of Meteor.Collection("MyCollection");
The issue is as soon as you close the application the data will be cleared. So this makes it very difficult to make your app offline only.
There is also a package being worked on to help allow offline collections while a server is not available: https://github.com/awwx/meteor-offline-data#readme
You can still use meteor with cordova and phonegap though, but you will need a data connection. To bundle your cordova application there is a very helpful script: https://github.com/guaka/meteor-phonegap
I have created an application using cordova, meteor and packmeteor.
For me it works pretty nicely.
I wrote a block post on how you can get started with it here.
For the local persistence of data I used GroundDB.

Creating a database in the blackberry device when the app is installed

I want to create a database on my blackberry device when my app is installed. I did not find any event (e.g. onInstalled) so that i can create my databse on this event when the app is installed.
Apparently there is a method DatabaseFactory.exists() which i can use to check if the database exists or not. But i do not want to check for this every time. I want to create the database when my app is installed and when the app is un-installed then the database should also get deleted.
Thanks
As far as I know RIM API SDK does not provide mechanism to catch install/uninstall events.
And even the database is once created it can be deleted/damaged via the filesystem. For instance user deletes database files from the media-card or from the device memory. Just because user does not know what these files contain and assumes these as temporary or something else.
It is a good approach to check the database presence before starting work with it. Otherwise user may get blank white screen with text "Exception 1234" and some additional text, or may get a popup with strange message, like "Error: FileNotFoundException...".
See the SQLiteDemo in the blackberry samples demo then you can get solution.

Resources