{"id":25168216,"url":"https://github.com/d-mobilelab/stargatejsapps","last_synced_at":"2025-05-01T13:38:42.211Z","repository":{"id":57369544,"uuid":"47700529","full_name":"D-Mobilelab/StargateJsApps","owner":"D-Mobilelab","description":"StargateJS hybridization library for HTML5 apps","archived":false,"fork":false,"pushed_at":"2018-09-18T17:40:41.000Z","size":9115,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-23T09:02:38.649Z","etag":null,"topics":["cordova-plugin","hosted-hybrid-app","hybrid","hybrid-apps","webapp"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/D-Mobilelab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-09T15:38:19.000Z","updated_at":"2017-04-12T09:28:38.000Z","dependencies_parsed_at":"2022-08-26T05:00:58.550Z","dependency_job_id":null,"html_url":"https://github.com/D-Mobilelab/StargateJsApps","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D-Mobilelab%2FStargateJsApps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D-Mobilelab%2FStargateJsApps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D-Mobilelab%2FStargateJsApps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D-Mobilelab%2FStargateJsApps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/D-Mobilelab","download_url":"https://codeload.github.com/D-Mobilelab/StargateJsApps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237915441,"owners_count":19386728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cordova-plugin","hosted-hybrid-app","hybrid","hybrid-apps","webapp"],"created_at":"2025-02-09T07:16:23.377Z","updated_at":"2025-02-09T07:16:24.186Z","avatar_url":"https://github.com/D-Mobilelab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis](http://img.shields.io/travis/D-Mobilelab/StargateJsApps.svg?branch=master\u0026style=flat)](https://travis-ci.org/D-Mobilelab/StargateJsApps)\n\n[![Coverage Status](https://coveralls.io/repos/D-Mobilelab/StargateJsApps/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/D-Mobilelab/StargateJsApps?branch=master)\n\n\n\n# StargateJsApps\n\n[![Join the chat at https://gitter.im/D-Mobilelab/StargateJsApps](https://badges.gitter.im/D-Mobilelab/StargateJsApps.svg)](https://gitter.im/D-Mobilelab/StargateJsApps?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nStargateJS hybridization library for HTML5 apps\n\n# Introduction\n\nStargateJsApps is an hybridization library for hosted apps built around ManifoldJS approach to hybrid application.\n\nHosted apps are hybrid application that have their files served remotely by a web server and that are described by a manifest (W3C specification)\n\n[ManifoldJS](https://github.com/D-Mobilelab/OfflineHostedWebApp) is Cordova plugin developed by Microsoft that inject all Cordova dependency after the page is loaded, decoupling the native platform implementation with the web app.\n\nStargateJsApps take advantage of the manifest to store it's configuration, like features to enable or remote api information.\n\n[Technical Documentation Game Module](http://d-mobilelab.github.io/StargateJsApps/gh-pages/0.4.5/module-src_modules_Game.html)\n\n# Installation\n\n### manual\nuse stargate.js or stargate.min.js in dist/ folder\n\n### bower\n\nInstall stargate bower package and save to dependencies (not dev dependencies):\n\n\n    $ bower install -S stargatejs-apps\n\n\n# API Reference\n\n### Method types\n#### S\n**Static**\nYou can call static methods independently from initialization of Stargate\n\n#### O\n**Require opened stargate**\nYou can call this type of methods only after Stargate is initialized and open: when Stargate is inside hybrid app and it had already fulfilled the initialization promise.\n\n#### B\n**Before initialize**\nYou should call this type of methods before initialization of Stargate: they usually set some callback or status needed inside initialization.\n\n#### P\n**Return promise**\nThis type of methods return a promise that is fulfilled when operation is succeeded.\n\n#### C\n**Use callbacks**\nThis type of methods use also or only callbacks for returning success or failure.\n\n\n\n\n## Stargate.isHybrid()\n    \n[[**Static**](#s)] get hybrid container status: true when we're running inside the hybrid app\n\n\u003e Internally it check if there is an url query parameter called \"hybrid\" with value 1, or if there is a cookie or a localStorage with the same name and value. \n\n\nReturn boolean\n\n## Stargate.getVersion()\n\n[[**Static**](#s)] return current Stargate version\n\n## Stargate.isInitialized() \n[[**Static**](#s)] get initialization status: true when initialization is already called\n\nReturn boolean\n\n## Stargate.isOpen()\n    \n[[**Static**](#s)] get initialization status: true when initialization is done\n\nReturn boolean\n\n## Stargate.setAnalyticsCallback(callBackFunction)\n\n[[**Before initialize**](#b)] Set the callback to call when an analytic event need to be sent.\n\nPlease call this before [Stargate.initialize](#stargateinitializeconfigurations-callback), so it can track events logged on initialize too, like MFP.\n\n## Stargate.setConversionDataCallback(callBackFunction)\n\n[[**Before initialize**](#b)] Set the callback to call when converion data from AppsFlyer are received.\nYou may need to save the data you receive, becouse you'll only got that data the first time the app is run after installation.\n\nPlease call this before [Stargate.initialize](#stargateinitializeconfigurations-callback), so it can call you during initialize too.\n\n## Stargate.initialize(configurations, callback)\n    \n[[**Use callbacks**](#c),[**Return promise**](#p)] Initialization of Stargate, you have to pass a configuration object and a callback that will be called when initialization has been finished.\n\nReturn a promise fulfilled when initialization has been finished.\n\nIf initialize has already been called then it will log a warning and will just execute the callback and return a promise that will be immediately fulfilled.\n\nIf initialize is called when we are outside hybrid environment (see [Stargate.isHybrid](#stargateishybrid)) then it will just execute the callback and return a promise that will be immediately fulfilled.\n\nThe callback is called with a boolean result indicating if we are inside hybrid environment or not (see [Stargate.isHybrid](#stargateishybrid)). Also the promise is fullfilled with the same boolean result.\n\n### Configurations parameter\n\nIt's a javascript object with configurations.\n\nOption|Type|Description|Default\n--- | --- | --- | ---\n*modules* | Array of string | List of modules to initialize | `[\"mfp\",\"iapbase\",\"appsflyer\",\"game\"]`\n*modules_conf* | Object | Configuration of submodule| `{}`\n\n#### modules configuration list\n\nValue|Description\n--- | --- \n*iap* | InApp purchase module\n*iaplight* | InApp purchase module based on [AlexDisler/cordova-plugin-inapppurchase](https://github.com/AlexDisler/cordova-plugin-inapppurchase)\n*mfp* | Mobile Fingerprint purchase module\n*appsflyer* | AppsFlyer module\n*game* | Offline game module\n\n#### modules_conf configuration object\n\nOption|Description|Default\n--- | --- | ---\n*iap* | InApp purchase configuration object | `undefined`\n*iaplight* | InApp purchase iaplight configuration object | `undefined`\n*mfp* | Mobile Fingerprint configuration object | `undefined`\n*appsflyer* | AppsFlyer configuration object | `undefined`\n\n#### modules_conf mfp configuration configuration object\n\nOption|Description|Default|Example\n--- | --- | --- | ---\n*country* | Country to use for mfp | `undefined` | \"`it`\"\n\nThere are two more variable needed for Mobile FingerPrint to work and these variable are retrieved from the manifest.json inside the app:\n\nValue|Description\n--- | --- \n*namespace* | namespace\n*label* | label\n\n#### modules_conf AppsFlyer configuration configuration object\n\nOption|Description|Default|Example\n--- | --- | --- | ---\n*autologin* | (boolean) enable autologin with pony value | `undefined` | `\"true\"`\n*fieldPony* | field where to look for the pony value | `\"af_sub1\"` | `\"af_sub2\"`\n*fieldReturnUrl* | field where to look for the return url value | `undefined` | `\"af_sub5\"`\n\nThe AppsFlyer module permit to autologin an user coming from the Webapp, when you pass from the Webapp to AppsFlyer the token of the user in the field which value is in fieldPony.\n\nIt also permit to go to a specific url (for example the url of the content where the user choosed to install the app) after it's logged in. This is done with the fieldReturnUrl value passed to the autologin url (api.mfpSetUriTemplate value in manifest.json).       \n\nThere are two more variable needed for AppsFlyer to work and these variable are retrieved from the manifest.json inside the app:\n\nValue|Description\n--- | --- \n*appstore_appid* | iOS App id\n*appsflyer_devkey* | devkey got from appsflyer\n\n#### modules_conf iap configuration configuration object\n\nOption|Description|Example\n--- | --- | ---\n*id* | Product id as registred on store | `\"stargate.test.spec.subscription\"`\n*alias* | Product alias | `\"Stargate Test Subscription\"`\n*type* | Type of product; it can be: FREE_SUBSCRIPTION, PAID_SUBSCRIPTION, CONSUMABLE, NON_CONSUMABLE | `\"PAID_SUBSCRIPTION\"`\n\n#### modules_conf iap light configuration configuration object\n\nOption|Description|Example\n--- | --- | ---\n*productsIdAndroid* | Array of Product id as registered on Google Store | `[\"stargate.test.spec.subscription1\",\"stargate.test.spec.subscription2\"]`\n*productsIdIos* | Array of Product id as registered on Apple Store | `[\"stargate.test.spec.ios.subscription1\",\"stargate.test.specios..subscription2\"]`\n\n\n\n### Example Usage\n```javascript\n\nvar configurations = {\n    modules: [\"mfp\", \"appsflyer\", \"iaplight\", \"game\"],\n    modules_conf: {\n        \"iaplight\": {\n            \"productsIdAndroid\": [\"com.mycompany.myapp.weekly.v1\",\"com.mycompany.myapp.montly.v1\"],\n            \"productsIdIos\": [\"com.mycompany.myapp.weekly.v1\",\"com.mycompany.myapp.montly.v1\"]\n        },\n        \"mfp\": {\n            \"country\": \"us\"\n        }\n    }\n};\n\nvar callback = function(result) {\n    console.log(\"Stargate initialized with result: \"+result);\n};\n\n// you can use the callback ...\nStargate.initialize(configurations, callback);\n\n// ... or the promise interface\nStargate.initialize(configurations, function(){})\n    .then(function(result) {\n        console.log(\"Stargate initialized with result: \"+result);\n    })\n    .fail(\n    function(error) {\n        console.error(\"Stargate initialization error: \", error);\n    });\n\n```\n\n\n## Stargate.openUrl(url)\n\n[[**Require opened stargate**](#o)] Open external url with InApp Browser\n\n\n## Stargate.checkConnection([callbackSuccess=function(){}], [callbackError=function(){}])\n### Example Usage\n```javascript\nvar info = Stargate.checkConnection();\nStargate.checkConnection(function(info){ console.log(info.networkState, info.type); });\n// info is equal to: {'networkState': \"wifi|3g|4g|none\", type:\"online|offline\"}\n```\n[[**Require opened stargate**](#o),[**Use callbacks**](#c)] The connection info object is updated to the last connection status change \nthe networkState is retrieved from navigator.connection.type of cordova-plugin-network-information plugin\n\n## Stargate.getDeviceID(callbackSuccess, callbackError)\n    \n[[**Require opened stargate**](#o),[**Use callbacks**](#c)] Call callbackSuccess with an object with the device id like this:\n{'deviceID': deviceID}\ndeviceID got from uuid of device plugin\n\n## Stargate.setStatusbarVisibility(visibility, callbackSuccess, callbackError)\n\n[[**Require opened stargate**](#o),[**Use callbacks**](#c)] Show/hide device status bar\n\nParameter boolean visibility\n\n## Stargate.facebookLogin(scope, callbackSuccess, callbackError)\n\n[[**Require opened stargate**](#o),[**Use callbacks**](#c)] Facebook connect\n\nParameter string scope: scope list separeted with comma\n\n## Stargate.socialShare(options)\n\n[[**Require opened stargate**](#o),[**Return promise**](#p)] Share an url on a social network\n\n### Parameters\n\n#### options object\n\nOptions key|Description|Example\n--- | --- | ---\n*type* | String: social network to use (chooser, facebook, twitter, whatsapp) | chooser\n*url* | String: url to share | \"http://www.google.com/?utm_source=stargate\"\n\n### Returns\n\nPromise fullfilled when sharing is done\n\n## Stargate.socialShareAvailable(options)\n\n[[**Require opened stargate**](#o),[**Return promise**](#p)] Return a list of social networks application installed on user device\n\n### Parameters\n\n#### options object\n\nOptions key|Description|Example\n--- | --- | ---\n*socials* | Object with socials to check if available (facebook, twitter, whatsapp) | {\"facebook\": true, \"twitter\": true, \"instagram\": false }\n*url* | String: url to share | \"http://www.google.com/?utm_source=stargate\"\n\n### Returns\n\nPromise fullfilled with an object with social networks availablility from the ones requested with parameter \"option.socials\"\nFor example:\n```javascript\n    {\n        \"facebook\": true,\n        \"twitter\": true,\n        \"instagram\": false\n    }\n```\n\n## Stargate.iaplight.getProductInfo(productId)\n\n[[**Require opened stargate**](#o),[**Return promise**](#p)] Return an object with In App Product information got from store on module initialization\n\n### Parameters\n\n#### productId\n\niap product id by which information will be returned\n\n### Returns\n\nPromise fullfilled with an object with iap product information:\n\n- productId - SKU / product bundle id (such as 'com.yourapp.prod1')\n- title - short localized title\n- description - long localized description\n- price - localized price\n\nFor example:\n```javascript\n    {\n        \"productId\": \"com.mycompany.myproduct.weekly.v1\",\n        \"title\": \"Abbonamento Premium MioProdotto\",\n        \"description\": \"Abonamento premium al MioProdotto\",\n        \"price\": \"€0,99\"\n    }\n```\n\n\n## Stargate.iaplight.subscribe(productId)\n\n[[**Require opened stargate**](#o),[**Return promise**](#p)] Request subscription of In App Product on store\n\n### Parameters\n\n#### productId\n\niap product id to subscribe to\n\n### Returns\n\nPromise fullfilled with an object with the following keys:\n\n- transactionId - The transaction/order id\n- productId - productId purchased\n- purchaseDate - purchase ISO date string format\n- purchaseTime - purchase Timestamp\n\nFor example:\n```javascript\n    {\n        \"productId\": \"com.mycompany.myproduct.weekly.v1\",\n        \"purchaseDate\": \"2017-04-18T09:19:41.000Z\",\n        \"purchaseTime\": \"1492507181\",\n        \"transactionId\": \"123412341234\"\n    }\n```\n\n\n## Stargate.iaplight.subscribeReceipt(productId)\n\n[[**Require opened stargate**](#o),[**Return promise**](#p)] Request subscription of In App Product on store\n\n### Parameters\n\n#### productId\n\niap product id to subscribe to\n\n### Returns\n\nIf successful, the promise resolves to an object with the following attributes that you will need for the receipt validation:\n\n- transactionId - The transaction/order id\n- receipt - On iOS it will be the base64 string of the receipt, on Android it will be a string of a json with all the transaction details required for validation such as {\"orderId\":\"...\",\"packageName:\"...\",\"productId\":\"...\",\"purchaseTime\":\"...\", \"purchaseState\":\"...\",\"purchaseToken\":\"...\"}\n- signature - On Android it can be used to consume a purchase. On iOS it will be an empty string.\n- productType - On Android it can be used to consume a purchase. On iOS it will be an empty string.\n\nReceipt validation: - To validate your receipt, you will need the receipt and signature on Android and the receipt and transactionId on iOS.\n\nFor example:\n```javascript\n\nvar ResultAndroid = {\n    \"signature\":\"base64encodedstring\",\n    \"productId\":\"product.id\",\n    \"transactionId\":\"fvjpwjfoviwjeovijwepvin\",\n    \"type\":\"subs\",\n    \"productType\":\"subs\",\n    \"receipt\":\"{\\\"packageName\\\":\\\"com.mycompany.myproduct\\\", \\\"productId\\\":\\\"product.id\\\", \\\"purchaseTime\\\":1510670063, \\\"purchaseState\\\":0, \\\"purchaseToken\\\":\\\"4rbQnUwZHb_wwZ\\\", \\\"autoRenewing\\\":true }\"\n};\n\nvar ResultIos = {\n    \"transactionId\": \"1000000221696692\",\n    \"receipt\": \"base64encodedstring\"\n};\n\n```\n\n\n## Stargate.iaplight.restore()\n\n[[**Require opened stargate**](#o),[**Return promise**](#p)] Request restore of In App Products already purchased on store\n\n### Returns\n\nIf successful, the promise resolves to:\n\n- *false* if no valid subscription restored\n- *{id: {...}}* map of productId with valid subscription restored\n\nFor example:\n```javascript\n    false\n```\n\n## Stargate.iaplight.getActiveSubscriptionsInfo()\n\n[[**Require opened stargate**](#o),[**Return promise**](#p)] Request list of In App Products with an active subscription\n\n### Returns\n\nIf successful, the promise resolves to:\n\n- *{id: {...}}* map of productId with active subscription\n\nFor example on Android:\n```javascript\n    {\n        \"com.mycompany.myproduct.weekly.v1\": {\n            \"packageName\": \"com.mycompany.myproduct\",\"productId\": \"com.mycompany.myproduct.weekly.v1\",\n            \"purchaseTime\": 1491209382421,\n            \"purchaseState\": 0,\n            \"purchaseToken\": \"nknmjmadpdhibpnaeibbxxxx\",\n            \"autoRenewing\": true\n        }\n    }\n\n```\n\n\n## Stargate.iaplight.isSubscribed(productId)\n\n[[**Require opened stargate**](#o),[**Return promise**](#p)] Return a promise returning a boolean that represent the subscription validity status. On iOS it execute the local decode of iOS receipt. On Android it perform a restore, than it check if there is the product requested and if it's valid.\n\n### Parameters\n\n#### productId\n\niap product id subscribed to\n\n### Returns\n\nPromise fullfilled with a Boolean that is the validity of the subscription of the requested productId\n\nUsage example:\n```javascript\n    Stargate.iaplight.isSubscribed(\"com.mycompany.myproduct\")\n    .then(function(subsciptionStatus){\n        console.log(\"Stargate.iaplight.isSubscribed\",subsciptionStatus);\n        if ( subsciptionStatus ) {\n            console.log(\"SuscriptionOK\")\n        } else {\n            console.warn(\"SubscriptionKO, request to pay!\")\n        }\n    }).catch(function(err){\n                console.error( \"Stargate.iaplight.isSubscribedERROR\", err);\n    })\n```\n\n## Stargate.iaplight Errors Code\n\nandroid error codes:\n```java\n  public static final int INVALID_ARGUMENTS = -1;\n  public static final int UNABLE_TO_INITIALIZE = -2;\n  public static final int BILLING_NOT_INITIALIZED = -3;\n  public static final int UNKNOWN_ERROR = -4;\n  public static final int USER_CANCELLED = -5;\n  public static final int BAD_RESPONSE_FROM_SERVER = -6;\n  public static final int VERIFICATION_FAILED = -7;\n  public static final int ITEM_UNAVAILABLE = -8;\n  public static final int ITEM_ALREADY_OWNED = -9;\n  public static final int ITEM_NOT_OWNED = -10;\n  public static final int CONSUME_FAILED = -11;\n```\n\niOS error codes:\n```objectivec\n    NSInteger const RMStoreErrorCodeDownloadCanceled = 300;\n    NSInteger const RMStoreErrorCodeUnknownProductIdentifier = 100;\n    NSInteger const RMStoreErrorCodeUnableToCompleteVerification = 200;\n```\n\ncommon error codes:\n```javascript\n  101: 'invalid argument - productIds must be an array of strings',\n  102: 'invalid argument - productId must be a string',\n  103: 'invalid argument - product type must be a string',\n  104: 'invalid argument - receipt must be a string of a json',\n  105: 'invalid argument - signature must be a string',\n```\n\nErrors arrive as objects like this:\n```javascript\n    {\n        errorCode: xxx,\n        code: xxx,\n    }\n```\n\n\n## Stargate.push.setScheduledNotify(parameters)\n\n[[**Require opened stargate**](#o),[**Return promise**](#p)] Request an auto push (local notification) on a specific date\n\n### Parameters\n\n#### options object\n\nOptions key|Description|Example\n--- | --- | ---\n*title* | [required] String title of notification | Stargate\n*text* | [required] String text of notification | Check out this cool library for hybrid apps!\n*date* | [required] Date when the notification will show up | new Date(new Date() + 5*1000)\n*deeplink* | [required] String url of a specific webapp page | \"http://www.stargate.com/#!/route/to/mypushedcontent\"\n\n### Returns\n\nPromise fullfilled with boolean result status\n\n\n## Stargate.facebookShare(url, callbackSuccess, callbackError)\n\n@deprecated since 0.5.0\n\n[[**Require opened stargate**](#o),[**Use callbacks**](#c)] Facebook sharing\n\nParameter string url: shared url\n\n## Stargate.inAppPurchaseSubscription(callbackSuccess, callbackError, subscriptionUrl, returnUrl)\n\n[[**Require opened stargate**](#o),[**Use callbacks**](#c)] IAP subscription\n    \n    \n\n## Stargate.inAppRestore(callbackSuccess, callbackError, subscriptionUrl, returnUrl)\n\n[[**Require opened stargate**](#o),[**Use callbacks**](#c)] IAP restore\n\n## Stargate.inAppProductInfo(productId, callbackSuccess, callbackError)\n\n[[**Require opened stargate**](#o),[**Use callbacks**](#c)] IAP product information\n\nCall callbacks with information about a product got from store\n\nproductId - product id about to query for information on store\n\ncallbackSuccess - a function that will be called when information are ready\n\ncallbackError - a function that will be called in case of error\n\n\n```javascript\n// example of object sent to success callback\n{\n    \"id\": \"stargate.test.spec.product1\",\n    \"alias\": \"Test Spec Product 1\",\n    \"title\": \"Test Spec Product 1\",\n    \"description\": \"Test Spec Product 1\",\n    \"currency\": \"EUR\",\n    \"price\": \"0,99 €\",\n    \"type\": \"paid subscription\",\n    \"canPurchase\": true,\n    \"downloaded\": false,\n    \"downloading\": false,\n    \"loaded\": true,\n    \"owned\": false,\n    \"state\": \"valid\",\n    \"transaction\": null,\n    \"valid\": true\n}\n```\n\n\n## Stargate.getAppInformation()\n\n[[**Require opened stargate**](#o)] return {object} with this information:\n\nValue|Description\n--- | --- \n*cordova* | Cordova version\n*manufacturer* | device manufacter\n*model* | device model\n*platform* | platform (Android, iOs, etc)\n*deviceId* | device UUID\n*version* | platform version\n*packageVersion* | package version\n*packageName* | package name ie: com.stargatejs.test\n*packageBuild* | package build number\n*stargate* | stargate version\n*stargateModules* | modules initialized\n*stargateError* | initialization error\n\n## Stargate.getAvailableFeatures()\n\n[[**Require opened stargate**](#o)] return {array} with list of features available in native, defined in manifest.json inside the package\n\n# Internal design\n\n## stargate configuration\nInside manifest there is an object that holds all configuration options of Stargate. This configuration is loaded with ManifoldJS hostedwebapp plugin.\n\n## initialization and device ready\n1. Stargate.initialize() save user configuration sent as parameter and attach to the cordova deviceready event the internal function onDeviceReady()\n2. onDeviceReady() request all needed data from plugin and internal async modules; wait for all request to complete, save the data received and call onPluginReady()\n3. onPluginReady() is the main internal initialization function where all syncronous processing is performed\n\n## gulp tasks\n\n* build (default task)\n* lint\n* test\n* karma (--browsers=[PhantomJS]|Chrome)\n* watch\n\n## release process\n\n1. github PR your feature branch to develop\n2. github PR develop to master\n3. git checkout master\n4. git pull\n5. npm version (minor|patch)\n6. git push\n7. git push --tags\n\n==to automate==\n\n## travis-ci\n\nTravis build the project on every push and check for lint and test errors. It also send the test coverage to coveralls.io\n\n## cordova plugin\nAll public api of Stargate requires some cordova plugins to be available in the app.\nThis is a list of the plugin used by the various function of Stargate:\n\nFunctionality|Cordova plugin required\n--- | --- \n*initialize* | [ManifoldJS D-Mobilelab fork](https://github.com/D-Mobilelab/OfflineHostedWebApp)\n*initialize* | [cordova-plugin-app-version](https://www.npmjs.com/package/cordova-plugin-appversion)\n*initialize* | [cordova-plugin-device](https://www.npmjs.com/package/cordova-plugin-device)\n*initialize* | [cordova-plugin-splashscreen](https://www.npmjs.com/package/cordova-plugin-splashscreen)\n*update offline files* | [cordova-plugin-code-push](https://www.npmjs.com/package/cordova-plugin-code-push)\n*iaplight* | [AlexDisler/cordova-plugin-inapppurchase](https://github.com/AlexDisler/cordova-plugin-inapppurchase)\n*iap* | [j3k0/cordova-plugin-purchase](https://github.com/j3k0/cordova-plugin-purchase)\n*socialShare* | [EddyVerbruggen/SocialSharing-PhoneGap-Plugin](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git)\n*appsflyer* | [cordova-plugin-appsflyer](https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk)\n*push* | [katzer/cordova-plugin-local-notifications](https://github.com/katzer/cordova-plugin-local-notifications)\n\n## offline and app launch\nWe have an html page on www folder of cordova project that check if there is network connectivity and if so go to the webapp, where HostedWebApp will inject the cordova.js.\nIf there isn't connectivity it goes to an offline version of the site, that can be only a message or can be a full app.\n\n# Contribute\n\n* git clone\n* npm install\n* bower install\n* gulp build\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-mobilelab%2Fstargatejsapps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-mobilelab%2Fstargatejsapps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-mobilelab%2Fstargatejsapps/lists"}