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.
Introduction: Previously PhoneGap was providing total package as a single version which contains all the necessary files for each platform. We are downloading the zip as a version and integrating the required files inside our Android application. It was working same till version 2.9 but from version 3.0 onwards the scenario is little different.
Description: From 3.0 onwards PhoneGap is not providing the zip file to download and integrate the same with our application. Now it is giving the install option, so we can directly install the PhoneGap into our system and use the same to create the application. Here we will focus on creating the Android application using version 3.0.
To install the PhoneGap we need some dependencies which will help PhoneGap to work properly. Continue reading →
Introduction: Most of the iOS application starts with the splash screen with the spinner which makes the sense that application is loading it’s required files and resources. But if you focus on the screen, you will find that while showing the splash screen, some part of the splash screen is hidden by the status bar.
Description: If we want to hide the status bar while showing the splash screen, it is very easy and we can view the splash screen completely by ignoring the staus bar above it.
Here is the the simple technique bellow.
1. Open Xcode and click on the project in Project Navigator.
2. In the target panel select the project and it will open the project details.
3. Choose the general tab form the list and we can find the Development Info panel in the list. And in Development Info there will be an option for Status Bar Style.
4. Then we need to tick the check box for “Hide during application launch”. Continue reading →
While working on a PhoneGap application , there was an requirement to take photo using device camera and upload in the sever. And PhoneGap provides an easy way to interact with the device camera and take photo using Camera API.
Description: Basically there are two ways to take photo from mobile device.
1. Taking photos using Camera
2. Taking photos from Library/Gallery
So here we will focus on displaying the image in our application using both ways. PhoneGap provides the camera.getPicture method which can help us to invoke camera and take images from mobile devices.
Custom URL scheme is the mechanism through which third party applications can interact with each other. Suppose we want an interaction between our app and the default email application in the device. Apps that support custom URL schemes can use the schemes to communicate with other applications and also initiate specific tasks. For example, an app can open from default email app in IOS devices using custom URL.
Description: To communicate with an app using a custom URL, we need to register the custom URL scheme in our appname-info.plist file. Apple by default supports for the http, mailto, tel, and SMS URL schemes. So if our URL scheme matches with the scheme mentioned by Apple then the Apple provided application will launch instead of our application. Therefore we need to be very careful before declaring the scheme.