]> git.proxmox.com Git - sencha-touch.git/blob - src/src/device/Splashscreen.js
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / src / device / Splashscreen.js
1 /**
2 * Provides access to the native Splashscreen API
3 *
4 * - [PhoneGap](http://docs.phonegap.com/en/2.6.0/cordova_splashscreen_splashscreen.md.html#Splashscreen)
5 *
6 * Class currently only works with Cordova and does not have a simulated HTML counter part.
7 * Please see notes on Cordova Docs for proper Native project code changes that
8 * will need to be made to use this plugin.
9 *
10 * http://docs.phonegap.com/en/2.6.0/cordova_splashscreen_splashscreen.md.html#Splashscreen
11 *
12 * For more information regarding Native APIs, please review our [Native APIs guide](../../../packaging/native_apis.html).
13 */
14 Ext.define('Ext.device.Splashscreen', {
15 singleton: true,
16
17 requires: [
18 'Ext.device.splashscreen.Cordova',
19 'Ext.device.splashscreen.Simulator'
20 ],
21
22 constructor: function() {
23 var browserEnv = Ext.browser.is;
24 if (browserEnv.WebView) {
25 if (browserEnv.Cordova) {
26 return Ext.create('Ext.device.splashscreen.Cordova');
27 }
28 }
29
30 return Ext.create('Ext.device.splashscreen.Simulator');
31 }
32 });