Promise is an object, which promises the user to get back the values or do some task after performing the promised activity without hampering the main UI. The execution of the other activities will work as normal. So in single word we can say, it is asynchronous.
The JOIN method of the Promise works like a waiter in the restaurant, waiting for the whole order from a table from each person. We can club separate promise objects and join them together. Join ensures to perform a task after all the promise objects finished their execution.
Queries encountered on the above
On all the above, I encountered the query,
what will happen when any of the Promise gets an error ?
Will it able to club the output and wait for the promises ? OR it will quite the execution ? Etc. etc.
In this post we will be talking about the most helpful feature provided by Android for a quick notification to user, i.e. Toasts “Small informative texts shown at bottom-center of device screen, for defined time duration”.
Default UI design of these toasts is a semi-transparent dark color background with white text over it, not even showing the name of application which spawned it, no so eye-catching, right? I know… So, let’s make a custom Toast Notification that complements our awesome UI…
How about creating a backup setting for an android application, so that when the application is uninstalled the personal settings it does not get erased permanently, instead the settings is stored on the cloud and the next time when you install the application it asks you to restore the settings. Interestingly, it can restore the settings when you install the application into other device too. It can be achieved through Backup API provided by Google. You will find it really interesting, easy and useful.
It’s not for the synchronizing of the data with other apps or storing the data which could further be used as in the case of SQLite . Also there is no method to access the backed up data other than the API and neither any way to make the Backup status known. This makes it easier to implement and lesser code it requires.
Android currently supports and provides helpers to backup and restore the complete data of the Shared Preferences or the internal storage if they are light weighted i.e. less than one megabyte.
For the implementation of Backup API the first and the foremost thing which has to be done is create the API key for your application by clicking on the link
Device Admin API is basically used for the access of the device at the administrative level. Like accessing the device password, disabling the device camera, limiting the size of the password, setting the maximum failed attempt for the password, erasing all the data of the device etc.
It basically is implemented with the use of three classes named as below,
The first and the foremost thing you need to do is create the MyDeviceAdminReciever.java class obviously after creating a new project and the MyDeviceAdminReceiver class should extend the DeviceAdminReciever class. The DeviceAdminReceiver class is the base class for implementing the DeviceAdminApi and in the app must contain its subclass.
Few days ago I received a comment from one of the reader of my blog to show an example on CRUD (Create, Read, Update and Delete) with the database. So in this post we will explore the use of CRUD operation using SQLite database in PhoneGap application.
CRUD can be described as a process, which helps the user to add, view, search and modify the information inside the database.
Here are the basic steps which demonstrates CRUD operation.
Create or add new entries
Read, retrieve, search or view existing entries
Update, modify or edit existing entries
Delete, deactivate or destroy existing entries
Before doing any operation on database let’s initialize the database first, either using HTML5 local database concept or using SQLite plugin. Continue reading →
Xamarin provides a number of ways to save data in iOS using Local Storage. User preferences are generally stored in Library/Preferences/.
Xamarin iOs provides its built in mechanism i.e. instead of creating files directly in the directory it is suggested to use NSUserDefaults class to save data.
Description: NSUserDefaults class provides its own built in mechanisms to save float, double, integers, Boolean and URL data. To save a custom object it should be converted to NSData object using NSUserDefaults. Continue reading →
Windows Phone comes with a number of controls for display. Among them the Panorama Control is one the new controls for user interaction and display.
Panorama Control spans beyond the screen and helps user to chose from a number of panorama items. Each panorama item can consists of Grids, Stack Panels and other Phone controls. Image applied to Panorama as background spans across all the panorama items. Only one panorama item is visible at a time and user can make selection from it. A swipe gesture gives the next or previous Panorama item. Continue reading →