diff options
Diffstat (limited to 'StoneIsland/platforms/android')
67 files changed, 3935 insertions, 2285 deletions
diff --git a/StoneIsland/platforms/android/AndroidManifest.xml b/StoneIsland/platforms/android/AndroidManifest.xml index dbd8afc1..bb6ffaef 100755 --- a/StoneIsland/platforms/android/AndroidManifest.xml +++ b/StoneIsland/platforms/android/AndroidManifest.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<manifest android:hardwareAccelerated="true" android:versionCode="6000" android:versionName="0.8.4" package="us.okfoc.stoneisland" xmlns:android="http://schemas.android.com/apk/res/android"> +<manifest android:hardwareAccelerated="true" android:versionCode="6090" android:versionName="0.9.0" package="us.okfoc.stoneisland" xmlns:android="http://schemas.android.com/apk/res/android"> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true"> @@ -23,48 +23,23 @@ </activity> <activity android:exported="true" android:name="com.adobe.phonegap.push.PushHandlerActivity" android:permission="${applicationId}.permission.PushHandlerActivity" /> <receiver android:name="com.adobe.phonegap.push.BackgroundActionButtonHandler" /> - <receiver android:exported="true" android:name="com.google.android.gms.gcm.GcmReceiver" android:permission="com.google.android.c2dm.permission.SEND"> - <intent-filter> - <action android:name="com.google.android.c2dm.intent.RECEIVE" /> - <category android:name="${applicationId}" /> - </intent-filter> - </receiver> - <service android:exported="false" android:name="com.adobe.phonegap.push.GCMIntentService"> - <intent-filter> - <action android:name="com.google.android.c2dm.intent.RECEIVE" /> - </intent-filter> - </service> - <service android:exported="false" android:name="com.adobe.phonegap.push.PushInstanceIDListenerService"> - <intent-filter> - <action android:name="com.google.android.gms.iid.InstanceID" /> - </intent-filter> - </service> - <service android:exported="false" android:name="com.adobe.phonegap.push.RegistrationIntentService" /> - <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService" /> - <service android:name="org.apache.cordova.firebase.FirebasePluginMessagingService"> + <receiver android:name="com.adobe.phonegap.push.PushDismissedHandler" /> + <service android:name="com.adobe.phonegap.push.FCMService"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> - <service android:name="org.apache.cordova.firebase.FirebasePluginInstanceIDService"> + <service android:name="com.adobe.phonegap.push.PushInstanceIDListenerService"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> </intent-filter> </service> - <receiver android:name="org.apache.cordova.firebase.OnNotificationOpenReceiver" /> </application> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="22" /> - <uses-permission android:name="android.permission.WAKE_LOCK" /> - <uses-permission android:name="android.permission.VIBRATE" /> - <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> - <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-feature android:name="android.hardware.location.gps" /> - <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" /> - <uses-permission android:name="${applicationId}.permission.PushHandlerActivity" /> - <permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" /> - <permission android:name="${applicationId}.permission.PushHandlerActivity" android:protectionLevel="signature" /> - <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> + <uses-permission android:name="android.permission.VIBRATE" /> </manifest> diff --git a/StoneIsland/platforms/android/CordovaLib/build.gradle b/StoneIsland/platforms/android/CordovaLib/build.gradle index 3ff6191b..da3b45bf 100644 --- a/StoneIsland/platforms/android/CordovaLib/build.gradle +++ b/StoneIsland/platforms/android/CordovaLib/build.gradle @@ -16,27 +16,31 @@ under the License. */ - +ext { + apply from: 'cordova.gradle' + cdvCompileSdkVersion = privateHelpers.getProjectTarget() + cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools() +} buildscript { repositories { mavenCentral() - jcenter(); + jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' } - } apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' +apply plugin: 'com.jfrog.bintray' -ext { - apply from: 'cordova.gradle' - cdvCompileSdkVersion = privateHelpers.getProjectTarget() - cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools() -} +group = 'org.apache.cordova' +version = '6.2.3' android { compileSdkVersion cdvCompileSdkVersion @@ -59,4 +63,73 @@ android { assets.srcDirs = ['assets'] } } + + packagingOptions { + exclude 'META-INF/LICENSE' + exclude 'META-INF/LICENSE.txt' + exclude 'META-INF/DEPENDENCIES' + exclude 'META-INF/NOTICE' + } +} + +install { + repositories.mavenInstaller { + pom { + project { + packaging 'aar' + name 'Cordova' + url 'https://cordova.apache.org' + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id 'stevengill' + name 'Steve Gill' + } + } + scm { + connection 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git' + developerConnection 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git' + url 'https://git-wip-us.apache.org/repos/asf?p=cordova-android' + + } + } + } + } +} + +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +artifacts { + archives sourcesJar +} + +bintray { + user = System.getenv('BINTRAY_USER') + key = System.getenv('BINTRAY_KEY') + configurations = ['archives'] + pkg { + repo = 'maven' + name = 'cordova-android' + userOrg = 'cordova' + licenses = ['Apache-2.0'] + vcsUrl = 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git' + websiteUrl = 'https://cordova.apache.org' + issueTrackerUrl = 'https://issues.apache.org/jira/browse/CB' + publicDownloadNumbers = true + licenses = ['Apache-2.0'] + labels = ['android', 'cordova', 'phonegap'] + version { + name = '6.2.3' + released = new Date() + vcsTag = '6.2.3' + } + } } diff --git a/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebView.java b/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebView.java index 2eebd0d3..713884b9 100644 --- a/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebView.java +++ b/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebView.java @@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback; * are not expected to implement it. */ public interface CordovaWebView { - public static final String CORDOVA_VERSION = "6.1.2"; + public static final String CORDOVA_VERSION = "6.2.3"; void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences); diff --git a/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/NativeToJsMessageQueue.java b/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/NativeToJsMessageQueue.java index 61d04f17..a8f59fad 100755 --- a/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/NativeToJsMessageQueue.java +++ b/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/NativeToJsMessageQueue.java @@ -488,6 +488,34 @@ public class NativeToJsMessageQueue { encodeAsMessageHelper(sb, pluginResult); } + void buildJsMessage(StringBuilder sb) { + switch (pluginResult.getMessageType()) { + case PluginResult.MESSAGE_TYPE_MULTIPART: + int size = pluginResult.getMultipartMessagesSize(); + for (int i=0; i<size; i++) { + PluginResult subresult = pluginResult.getMultipartMessage(i); + JsMessage submessage = new JsMessage(subresult, jsPayloadOrCallbackId); + submessage.buildJsMessage(sb); + if (i < (size-1)) { + sb.append(","); + } + } + break; + case PluginResult.MESSAGE_TYPE_BINARYSTRING: + sb.append("atob('") + .append(pluginResult.getMessage()) + .append("')"); + break; + case PluginResult.MESSAGE_TYPE_ARRAYBUFFER: + sb.append("cordova.require('cordova/base64').toArrayBuffer('") + .append(pluginResult.getMessage()) + .append("')"); + break; + default: + sb.append(pluginResult.getMessage()); + } + } + void encodeAsJsMessage(StringBuilder sb) { if (pluginResult == null) { sb.append(jsPayloadOrCallbackId); @@ -495,29 +523,16 @@ public class NativeToJsMessageQueue { int status = pluginResult.getStatus(); boolean success = (status == PluginResult.Status.OK.ordinal()) || (status == PluginResult.Status.NO_RESULT.ordinal()); sb.append("cordova.callbackFromNative('") - .append(jsPayloadOrCallbackId) - .append("',") - .append(success) - .append(",") - .append(status) - .append(",["); - switch (pluginResult.getMessageType()) { - case PluginResult.MESSAGE_TYPE_BINARYSTRING: - sb.append("atob('") - .append(pluginResult.getMessage()) - .append("')"); - break; - case PluginResult.MESSAGE_TYPE_ARRAYBUFFER: - sb.append("cordova.require('cordova/base64').toArrayBuffer('") - .append(pluginResult.getMessage()) - .append("')"); - break; - default: - sb.append(pluginResult.getMessage()); - } + .append(jsPayloadOrCallbackId) + .append("',") + .append(success) + .append(",") + .append(status) + .append(",["); + buildJsMessage(sb); sb.append("],") - .append(pluginResult.getKeepCallback()) - .append(");"); + .append(pluginResult.getKeepCallback()) + .append(");"); } } } diff --git a/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewEngine.java b/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewEngine.java index 0fa02767..3be7d940 100755 --- a/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewEngine.java +++ b/StoneIsland/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewEngine.java @@ -210,6 +210,11 @@ public class SystemWebViewEngine implements CordovaWebViewEngine { settings.setAppCachePath(databasePath); settings.setAppCacheEnabled(true); + // Enable scaling + // Fix for CB-12015 + settings.setUseWideViewPort(true); + settings.setLoadWithOverviewMode(true); + // Fix for CB-1405 // Google issue 4641 String defaultUserAgent = settings.getUserAgentString(); diff --git a/StoneIsland/platforms/android/android.json b/StoneIsland/platforms/android/android.json index 11c3ca04..d0e21212 100755 --- a/StoneIsland/platforms/android/android.json +++ b/StoneIsland/platforms/android/android.json @@ -49,15 +49,11 @@ "count": 1 }, { - "xml": "<feature name=\"PushNotification\"><param name=\"android-package\" value=\"com.adobe.phonegap.push.PushPlugin\" /></feature>", - "count": 1 - }, - { "xml": "<feature name=\"StatusBar\"><param name=\"android-package\" value=\"org.apache.cordova.statusbar.StatusBar\" /><param name=\"onload\" value=\"true\" /></feature>", "count": 1 }, { - "xml": "<feature name=\"FirebasePlugin\"><param name=\"android-package\" value=\"org.apache.cordova.firebase.FirebasePlugin\" /><param name=\"onload\" value=\"true\" /></feature>", + "xml": "<feature name=\"PushNotification\"><param name=\"android-package\" value=\"com.adobe.phonegap.push.PushPlugin\" /></feature>", "count": 1 } ] @@ -75,35 +71,15 @@ "count": 1 }, { - "xml": "<receiver android:exported=\"true\" android:name=\"com.google.android.gms.gcm.GcmReceiver\" android:permission=\"com.google.android.c2dm.permission.SEND\"><intent-filter><action android:name=\"com.google.android.c2dm.intent.RECEIVE\" /><category android:name=\"${applicationId}\" /></intent-filter></receiver>", + "xml": "<receiver android:name=\"com.adobe.phonegap.push.PushDismissedHandler\" />", "count": 1 }, { - "xml": "<service android:exported=\"false\" android:name=\"com.adobe.phonegap.push.GCMIntentService\"><intent-filter><action android:name=\"com.google.android.c2dm.intent.RECEIVE\" /></intent-filter></service>", + "xml": "<service android:name=\"com.adobe.phonegap.push.FCMService\"><intent-filter><action android:name=\"com.google.firebase.MESSAGING_EVENT\" /></intent-filter></service>", "count": 1 }, { - "xml": "<service android:exported=\"false\" android:name=\"com.adobe.phonegap.push.PushInstanceIDListenerService\"><intent-filter><action android:name=\"com.google.android.gms.iid.InstanceID\" /></intent-filter></service>", - "count": 1 - }, - { - "xml": "<service android:exported=\"false\" android:name=\"com.adobe.phonegap.push.RegistrationIntentService\" />", - "count": 1 - }, - { - "xml": "<service android:enabled=\"true\" android:exported=\"false\" android:name=\"com.google.android.gms.measurement.AppMeasurementService\" />", - "count": 1 - }, - { - "xml": "<service android:name=\"org.apache.cordova.firebase.FirebasePluginMessagingService\"><intent-filter><action android:name=\"com.google.firebase.MESSAGING_EVENT\" /></intent-filter></service>", - "count": 1 - }, - { - "xml": "<service android:name=\"org.apache.cordova.firebase.FirebasePluginInstanceIDService\"><intent-filter><action android:name=\"com.google.firebase.INSTANCE_ID_EVENT\" /></intent-filter></service>", - "count": 1 - }, - { - "xml": "<receiver android:name=\"org.apache.cordova.firebase.OnNotificationOpenReceiver\" />", + "xml": "<service android:name=\"com.adobe.phonegap.push.PushInstanceIDListenerService\"><intent-filter><action android:name=\"com.google.firebase.INSTANCE_ID_EVENT\" /></intent-filter></service>", "count": 1 } ], @@ -123,26 +99,6 @@ { "xml": "<uses-permission android:name=\"android.permission.VIBRATE\" />", "count": 1 - }, - { - "xml": "<uses-permission android:name=\"com.google.android.c2dm.permission.RECEIVE\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"${applicationId}.permission.C2D_MESSAGE\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"${applicationId}.permission.PushHandlerActivity\" />", - "count": 1 - }, - { - "xml": "<permission android:name=\"${applicationId}.permission.C2D_MESSAGE\" android:protectionLevel=\"signature\" />", - "count": 1 - }, - { - "xml": "<permission android:name=\"${applicationId}.permission.PushHandlerActivity\" android:protectionLevel=\"signature\" />", - "count": 1 } ], "/*/application/activity": [], @@ -153,7 +109,7 @@ }, { "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />", - "count": 2 + "count": 1 }, { "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />", @@ -166,14 +122,6 @@ { "xml": "<uses-feature android:name=\"android.hardware.location.gps\" />", "count": 1 - }, - { - "xml": "<uses-permission android:name=\"android.permission.INTERNET\" />", - "count": 1 - }, - { - "xml": "<uses-permission android:name=\"android.permission.WAKE_LOCK\" />", - "count": 1 } ], "/manifest/application/activity": [ @@ -195,20 +143,7 @@ }, "res/values/strings.xml": { "parents": { - "/resources": [ - { - "xml": "<string name=\"google_app_id\">XXXXXXX</string>", - "count": 1 - }, - { - "xml": "<string name=\"google_app_id\">@string/google_app_id</string>", - "count": 1 - }, - { - "xml": "<string name=\"google_api_key\">@string/google_api_key</string>", - "count": 1 - } - ] + "/resources": [] } }, "config.xml": { @@ -264,19 +199,15 @@ "ionic-plugin-keyboard": { "PACKAGE_NAME": "us.okfoc.stoneisland" }, - "phonegap-plugin-push": { - "SENDER_ID": "XXXXXXX", - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, "cordova-plugin-statusbar": { "PACKAGE_NAME": "us.okfoc.stoneisland" }, - "cordova-plugin-firebase": { - "PACKAGE_NAME": "us.okfoc.stoneisland" - }, "cordova-plugin-app-name": { "APP_NAME": "Stone Island", "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "phonegap-plugin-push": { + "PACKAGE_NAME": "us.okfoc.stoneisland" } }, "dependent_plugins": {}, @@ -379,14 +310,6 @@ "runs": true }, { - "id": "phonegap-plugin-push.PushNotification", - "file": "plugins/phonegap-plugin-push/www/push.js", - "pluginId": "phonegap-plugin-push", - "clobbers": [ - "PushNotification" - ] - }, - { "id": "cordova-plugin-statusbar.statusbar", "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", "pluginId": "cordova-plugin-statusbar", @@ -395,11 +318,11 @@ ] }, { - "id": "cordova-plugin-firebase.FirebasePlugin", - "file": "plugins/cordova-plugin-firebase/www/firebase.js", - "pluginId": "cordova-plugin-firebase", + "id": "phonegap-plugin-push.PushNotification", + "file": "plugins/phonegap-plugin-push/www/push.js", + "pluginId": "phonegap-plugin-push", "clobbers": [ - "FirebasePlugin" + "PushNotification" ] } ], @@ -416,9 +339,8 @@ "cordova-plugin-compat": "1.1.0", "cordova-plugin-geolocation": "2.4.0", "ionic-plugin-keyboard": "2.2.1", - "phonegap-plugin-push": "1.9.2", "cordova-plugin-statusbar": "2.2.3", - "cordova-plugin-firebase": "0.1.24", - "cordova-plugin-app-name": "1.0.4" + "cordova-plugin-app-name": "1.0.4", + "phonegap-plugin-push": "2.0.0" } }
\ No newline at end of file diff --git a/StoneIsland/platforms/android/assets/www/cordova.js b/StoneIsland/platforms/android/assets/www/cordova.js index 18c020e7..bda7c3e5 100644 --- a/StoneIsland/platforms/android/assets/www/cordova.js +++ b/StoneIsland/platforms/android/assets/www/cordova.js @@ -1,5 +1,5 @@ // Platform: android -// 7c5fcc5a5adfbf3fb8ceaf36fbdd4bd970bd9c20 +// 7ef9f9c03167a4dde4372d869472241b6816fee9 /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var PLATFORM_VERSION_BUILD_LABEL = '6.1.2'; +var PLATFORM_VERSION_BUILD_LABEL = '6.2.3'; // file: src/scripts/require.js /*jshint -W079 */ @@ -330,7 +330,7 @@ module.exports = cordova; }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js +// file: /Users/maj/src/cordova-android/cordova-js-src/android/nativeapiprovider.js define("cordova/android/nativeapiprovider", function(require, exports, module) { /** @@ -353,7 +353,7 @@ module.exports = { }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js +// file: /Users/maj/src/cordova-android/cordova-js-src/android/promptbasednativeapi.js define("cordova/android/promptbasednativeapi", function(require, exports, module) { /** @@ -886,7 +886,7 @@ module.exports = channel; }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/exec.js +// file: /Users/maj/src/cordova-android/cordova-js-src/exec.js define("cordova/exec", function(require, exports, module) { /** @@ -1649,7 +1649,7 @@ exports.reset(); }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/platform.js +// file: /Users/maj/src/cordova-android/cordova-js-src/platform.js define("cordova/platform", function(require, exports, module) { // The last resume event that was received that had the result of a plugin call. @@ -1759,7 +1759,7 @@ function onMessageFromNative(msg) { }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/plugin/android/app.js +// file: /Users/maj/src/cordova-android/cordova-js-src/plugin/android/app.js define("cordova/plugin/android/app", function(require, exports, module) { var exec = require('cordova/exec'); diff --git a/StoneIsland/platforms/android/assets/www/cordova_plugins.js b/StoneIsland/platforms/android/assets/www/cordova_plugins.js index ea5e1643..8aaece20 100755 --- a/StoneIsland/platforms/android/assets/www/cordova_plugins.js +++ b/StoneIsland/platforms/android/assets/www/cordova_plugins.js @@ -98,14 +98,6 @@ module.exports = [ "runs": true }, { - "id": "phonegap-plugin-push.PushNotification", - "file": "plugins/phonegap-plugin-push/www/push.js", - "pluginId": "phonegap-plugin-push", - "clobbers": [ - "PushNotification" - ] - }, - { "id": "cordova-plugin-statusbar.statusbar", "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", "pluginId": "cordova-plugin-statusbar", @@ -114,11 +106,11 @@ module.exports = [ ] }, { - "id": "cordova-plugin-firebase.FirebasePlugin", - "file": "plugins/cordova-plugin-firebase/www/firebase.js", - "pluginId": "cordova-plugin-firebase", + "id": "phonegap-plugin-push.PushNotification", + "file": "plugins/phonegap-plugin-push/www/push.js", + "pluginId": "phonegap-plugin-push", "clobbers": [ - "FirebasePlugin" + "PushNotification" ] } ]; @@ -137,10 +129,9 @@ module.exports.metadata = "cordova-plugin-compat": "1.1.0", "cordova-plugin-geolocation": "2.4.0", "ionic-plugin-keyboard": "2.2.1", - "phonegap-plugin-push": "1.9.2", "cordova-plugin-statusbar": "2.2.3", - "cordova-plugin-firebase": "0.1.24", - "cordova-plugin-app-name": "1.0.4" + "cordova-plugin-app-name": "1.0.4", + "phonegap-plugin-push": "2.0.0" }; // BOTTOM OF METADATA });
\ No newline at end of file diff --git a/StoneIsland/platforms/android/assets/www/css/nav.css b/StoneIsland/platforms/android/assets/www/css/nav.css index 9445f5cb..28385680 100755 --- a/StoneIsland/platforms/android/assets/www/css/nav.css +++ b/StoneIsland/platforms/android/assets/www/css/nav.css @@ -17,11 +17,6 @@ -webkit-transform: translateZ(0) translateX(0px); -webkit-transition: -webkit-transform 0.1s; } -.ios #nav, -.ios #content { - top: 20px; - height: -webkit-calc(100% - 20px); -} .nav #nav { -webkit-transform: translateZ(0) translateX(0); } diff --git a/StoneIsland/platforms/android/assets/www/css/products.css b/StoneIsland/platforms/android/assets/www/css/products.css index bdfed42a..c4599866 100755 --- a/StoneIsland/platforms/android/assets/www/css/products.css +++ b/StoneIsland/platforms/android/assets/www/css/products.css @@ -24,6 +24,11 @@ height: 126vw; } +#collection .item .product-title { + padding-bottom: 18px; + display: inline-block; +} + .product #product { display: block } #product { display: none; @@ -104,6 +109,20 @@ position:relative; font-weight:bold; } +.product .product-header.wide { + max-width:100%; +} + +.product-group { + margin-top: 28px; + margin-bottom: 18px; + font-weight: bold; + text-align: center; + font-size: 17px; +} +.product-group:first-child { + margin-top: 0; +} #product::before { content:''; @@ -224,6 +243,9 @@ padding-bottom:45px; #collection h1 { background-color: white; +} + +#collection h1.single-dept { background-image: url(../img/angle-down.png); background-size: contain; background-position: top right; @@ -231,6 +253,6 @@ padding-bottom:45px; } #selector { -z-index:9 + z-index:9 } diff --git a/StoneIsland/platforms/android/assets/www/db.json b/StoneIsland/platforms/android/assets/www/db.json new file mode 100644 index 00000000..7e0fa471 --- /dev/null +++ b/StoneIsland/platforms/android/assets/www/db.json @@ -0,0 +1,2124 @@ +{ + "story": [ + { + "id": "philosophy", + "title": "Philosophy", + "image": { + "uri": "http://cdn3.yoox.biz/stoneisland/wp-content/uploads/2013/11/philosophy1.jpg", + "caption": "" + }, + "body": "A culture of research, experimentation, function and use are the matrixes that have always defined Stone Island: the sportswear brand established in 1982, designed to become a symbol of extreme research on fibers and textiles, applied to an innovative design. Season after season, it is through the study of form and the “manipulation” of the matter that Stone Island has found its own language with the aim of establishing new boundaries in the world of garment making. \r\n\r\nThe study of uniforms and of work wear, its evolution according to new requirements of use, has become Stone Island’s observation post for defining a project in which the clothing item’s function is never just aesthetic.\r\n\r\nAn ongoing investigation, thorough and without frontiers, on the processing and ennobling of fibers and textiles, leading to discover materials and production techniques never used before in the clothing industry.\r\n\r\nJackets constructed in nylon monofilament, deriving from the water filtering technology. Highly reflective or thermo-sensitive fabrics, changing color with the variation of temperature. Featherweight polyester cloth vacuum- coated with a 100% stainless steel film used in aviation technology to protect the on-board computers. Non-woven materials, Kevlar® and polyester felt, rhomboidal nets in polyester used in the construction industry and coated in polyurethane. These are some examples of materials conceived by Stone Island philosophy.\r\n\r\nStone Island’s strength is also based on the unique ability to intervene on the finished item, through the continuous tests on dyeing and treatments carried out in the Sportswear Company’s laboratory of color. A department able to combine advanced technology, experience and human capacity and that has developed more than 60,000 different recipes of dyes throughout the years.\r\n\r\nAll the accumulated knowledge and experience, an inalienable heritage, on which great part of Stone Island’s know-how is based, is kept in the historical archive that collects the trial tests, and the recipes for textile dyeing and handling that have been developed by all those people who have worked on this project with passion.", + "__index": "0", + "dateCreated": "Thu, 05 Nov 2015 00:24:44 GMT" + }, + { + "id": "history", + "title": "History", + "image": { + "uri": "https://ltho.s3.amazonaws.com/ce68408c-34b3-40ca-8ddf-c10cd1412c5f.jpg", + "caption": "" + }, + "body": "Stone Island, the Italian brand that reinvented the concept of casual wear, was founded in 1982 out of the passion and brilliant research into textile finishing performed by its creator and art director, intellectual from Bologna, Massimo Osti. It was Osti, in the mid-Seventies, who researched thousands of uniforms and pieces of work clothing and catalogued their functional characteristics. In Ravarino, in the province of Modena, he created a company whose hub was a full-scale center of research into materials and treatments became a sophisticated laboratory for garment and experimental dyeing.\r\n\r\nThe story of Stone Island began, almost by chance, with research into a special material, a thick truck tarpaulin, the outstanding feature of which was that it had been resin-treated in red on one side and blue on the other. The first prototype was too stiff, so it was washed for a long period in water with pumice stones to break down the structure of the material. The result was surprising, a worn-look garment with great appeal. It was therefore decided to create seven jackets in that unique fabric called Tela Stella, and to give this product a name. The strong identity of the project called for an important name, which was identified by analyzing the most commonly occurring words in Joseph Conrad’s novels: the words Stone and Island were chosen.\r\n\r\nStone Island has a marine feel, conjuring up old oilskins corroded by the sea and a military feel, which is drawn from the fund of research completed until that time. The name also evokes a love of the sea and that first treatment selected to “process” the garments. The badge, the detachable fabric label that has distinguished Stone Island garments since the first season, showed a Compass Rose, displayed like a military badge.\r\n\r\nThe reaction is immediate. Stone Island became a success phenomenon, with no set plan or marketing research behind it: a uniquely Italian mix of creativity, intuition and entrepreneurial spirit. A star was born.", + "__index": "1", + "dateCreated": "Thu, 05 Nov 2015 00:27:25 GMT" + }, + { + "id": "carlo-rivetti", + "title": "Carlo Rivetti", + "image": { + "uri": "https://ltho.s3.amazonaws.com/2fe16d85-e85f-4f12-ae55-72622c8efafd.jpg", + "caption": "" + }, + "body": "My family has deep roots within the clothing industry. In the 19th century, Giuseppe Rivetti – son of Giovanni Battista, Italy’s first carding machine operator, inherited his father’s passion and in order to fund his own wool factory he secretly sold cows from the family farms to buy looms. By 1872 he had his own wool factory: “Giuseppe Rivetti e Figli”, which later merged with the Turin based GFT group (Gruppo Finanziario Tessile). There, my uncle Pinot had the unique idea of rubberizing wool fabrics to increase their performance.
This fondness for research also drove my father, Silvio. In the immediate post-war period, he set off for the United States where he found the Palm Beach Incorporated company, who produced something that didn’t yet exist in Europe: clothing constructed on theoretical measurements; what we now know as sizes.
My father was stunned, working for six months as a laborer, before returning and convincing his brothers to give up their shares in the wool factories in order to buy out GFT. \r\n\r\nIn the early 1950’s GFT measured more than 25,000 Italians, which allowed them to effectively dress the whole nation for the first time with non-tailored garments. \r\n\r\nThe 1973 oil crisis brought severe yet swift recession, and something had to be done to recover sales. My cousin, Marco Rivetti, noticed a French couturier working in a women’s outerwear firm we’d acquired one year earlier. He would design and fit the garments, write orders in Paris and then use our company to manufacture them. He was Emanuel Ungaro. This led us to realize that in order to re-launch the sector we needed to add a fundamental ingredient to the clothing industry: fashion.
As a result, GFT became a licensee of the rising stars of Italian fashion, including Giorgio Armani and Valentino. The rise of Italian-made Prêt à Porter was due to the ability to combine entrepreneurial ability with creativity.\r\n\r\nI joined GFT in 1975. Towards the end of that decade, I had the idea to start a new area within the group; to generate something more timeless: sportswear. In the early 1980’s, I discovered C.P. Company, a firm known for being innovative and cutting edge in this field. The company was owned by Trabaldo Togna and Massimo Osti, a graphic artist by profession and the firm’s designer and art director. We bought first 50% in 1983 and later on the entire company.
That was the beginning of my journey. In 1993 I left GFT and, together with my sister Cristina, acquired 100% of the firm which is known today as Sportswear Company.
\r\n\r\nIt was in 1983 that I got to know Massimo Osti, who had brought Stone Island into existence almost by chance, a year earlier. A special fabric named ‘Tela Stella’ had arrived in the company: a cloth that had a different color on each side, used to make truck tarpaulins. The effect was very interesting but had little to do with the existing C.P. Company line. Osti decided to do something special with that fabric and created a collection of just seven jackets. The collection strongly referenced military style with the now iconic badge inspired by military insignia. The compass symbolized love for the sea and an aim for constant research.\r\n\r\nMassimo was at least ten years ahead of others in his field. He saw himself as a producer rather than a fashion designer.
His achievement establishing Stone Island was not only appealing and saleable, but also true to his core belief in informal wear. His ideas were drawn from military and work wear, accompanying them with endless textile research.\r\n\r\nIn the mid-nineties, Massimo our paths eventually came apart, and I found myself with the difficult task of finding someone to design Stone Island.
In 1994 as I wandered through a Munich trade fair I came across the work of designer Paul Harvey, an English designer who lived in Sant’Arcangelo di Romagna, Italy. I was struck by a strange feeling of familiarity and cried out: “so here’s the Stone of the 21st Century!”. From 1996, with Paul, we embarked on the second era of our brand.\r\n\r\nPaul designed 24 collections, each consistent in the evolution and research that has always set Stone Island apart.
He is another extraordinary character. After graduating Central Saint Martins, he decided fashion was not his career path and worked as a truck driver! Only after marrying a fantastic Italian lady and moving to Italy did he start designing clothes.
His approach to design has functionality in its blood, which allowed him to interpret Stone Island perfectly. He led the brand masterfully into the new century. \r\n\r\nAfter 12 marvelous years, Paul needed to leave the fashion world to “do something for the Planet”. With such a noble ambition, I could only accept and support his decision.
In that moment, facing another crucial decision, I came to the conclusion the era of “one man at the helm” was over.
Times had changed. It was necessary to be multicultural in order to be truly contemporary.
I built a design team. I felt that in this era it is this possible to face all aspects of a world only with several minds and several visions: and this has been Stone Island from 2008 to today.
\r\n\r\nI feel like the coach. I choose which men to send onto the pitch, depending upon who we have to play: We need to be more sensitive, faster, and ready to grasp the signs of strength and weakness.
As a result, we need multi-cultural people that travel the world and observe it from different viewpoints: people of different ages and from different cultures.\r\n\r\nThis, in short, is my story. I like to think there’s a common thread that binds us all. A desire for continual experimentation and research, not without a touch of healthy insanity: that special something that makes our Stone Island much more than a just a clothing brand.\r\n\r\n<i>Carlo Rivetti,\r\nPresident and Creative Director, Stone Island</i>", + "__index": "2", + "dateCreated": "Thu, 05 Nov 2015 00:27:38 GMT" + } + ], + "archive": [ + { + "id": "-010-015", + "title": "'010'015", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/2bafd7a2-fbbb-4904-8e64-ff394888fd24.png", + "label": "LIQUID REFLECTIVE", + "code": "5315 42944", + "caption": "Fabric that is highly reflective owing to its coating made up\r\nof thousands of glass microspheres. Each finished garment\r\nis hand sprayed individually and individually baked dry.\r\nThe varying intensity of the reflective element and varying\r\nintensity of color, the dribbling and speckled effect, are\r\nowing to the high level of craftsmanship involved in the\r\nprocess, making each garment unique and unrepeatable.\r\nLining in quilted microfiber with polyester padding.\r\nStone Island badge with white embroidery, reserved for\r\ngarments that are made using advanced research into\r\nfabrics or processes." + }, + { + "uri": "https://ltho.s3.amazonaws.com/a0714935-2800-425f-9b34-63fdc4a7fc78.png", + "label": "30/30 JACKET", + "code": "5715 4TTY2", + "caption": "The 30/30 jacket is a cross section of the state of the art of Stone Island. A testament to three decades of exploration and development, it has been designed to embody the spirit of Stone Island’s endless creativity. Linked by the signature looped rigging system, both the jacket shell and jacket liner are reversible. These can be worn, either together or alone, in a total of 10 different ways. The transformative\r\nproperties of the fabrics mean that these 10 ways can each be worn in 3 different modes: Ice, Reflective,\r\nand Normal; resulting in a total of 30 different jacket states.\r\nThis piece features is our 30th anniversary special edition badge.\r\nJACKET /SHELL _ RASO GOMMATO PRISMATIC COVER.\r\nSatin weave cotton of military origin bonded on the inside to a a shiny transparent fine-grained polyurethane film reflecting the light, magnifying the color effects and bestowing the surface with a three-dimensional and ‘liquid’ appearance.\r\nJACKET/ LINER_ THERMO REFLECTIVE / ENGINEERED WOOL\r\nThis material merges two of Stone Island’s most avant-garde research paths. It explores the interaction between light refraction and thermosensitivity technologies. The resins used to coat the nylon substrate host both the glass microspheres allowing fabric refraction and the micro-encapsulated pigments modifying the passage of light and thus enabling color changes in relation to temperature. The final effect is an organic and dynamic interaction of light and color. On the reverse side, an engineered wool face made with a double knit machine." + }, + { + "uri": "https://ltho.s3.amazonaws.com/d51dce63-d467-45ea-88a6-5b077ffe3c3c.png", + "label": "REFLECTIVE KNIT WITH WINDSTOPPER® 3L", + "code": "5715 587Y5", + "caption": "To celebrate the thirtieth anniversary of Stone Island, a yarn has been engineered that represents the\r\nheight of our tireless research. The President’S Knit 5715 has been created in Reflective yarn, made\r\nup of micro plates coated with glass microspheres trapped inside a polyester mesh. The structure of\r\nthe jumper has been made double, reflective on the outside and wool on the inside. The outer face\r\nhas then been printed in a darker shade using heat and pressure sublimation printing to amalgamate\r\nthe fibers, obtain an even surface and reduce the strong reflective appearance.\r\nThe detachable padded and quilted lining has been created in a polyester jersey laminated with a\r\nWindstopper® membrane, which provides an unbeatable balance between protection and comfort.\r\nThis piece features is our 30th anniversary special edition badge." + }, + { + "uri": "https://ltho.s3.amazonaws.com/5883b275-a2eb-4a34-890f-69b30250a62b.png", + "label": "RASO HAND PAINTED TORTOISE SHELL", + "code": "6115 70565", + "caption": "Trench coat in a satin-weave cotton fabric of military origin. The garment has been dyed and then faded in selected areas with a corrosive paste. The bleached parts have then been hand-painted with a tortoiseshell-inspired motif also appearing on the Stone Island badge on the left sleeve. This extraordinary manual process makes each piece unique and unrepeatable. Detachable hood in garment-dyed padded iridescent nylon. Detachable lining in GARMENT-DYED DOWN_26 GR X SQM_N, an ultra-light nylon weighing only 26 grams per square meter, filled with the finest down specially treated to bear the stress of the garment dyeing procedure. Garment-dyed with special dye recipes. It is secured to the outer garment by the iconic Stone Island fastening system." + }, + { + "uri": "https://ltho.s3.amazonaws.com/a25cc013-5c2c-4221-974a-987b8fd00ab4.png", + "label": "HAND PAINTED SHEEPSKIN", + "code": "6115 00379", + "caption": "Sheepskin parka. The finished piece has been hand-sprayed on the outer face with a resin based product and then hand waxed to achieve a softer feel. Hood edged by fur trim. " + }, + { + "uri": "https://ltho.s3.amazonaws.com/fa5ed231-8b04-4ecc-b126-7a5543d5614a.png", + "label": "ICE JACKET THERMO-SENSITIVE FABRIC", + "code": "6115 43098", + "caption": "Hooded jacket in thermo sensitive fabric. A water- and wind-resistant polyurethane film is embedded with micro-encapsulated pigments. The molecules of these pigments modify the path of light and change color according to the temperature. The garment is then padded with the finest down.Two chest patch pockets, with snap-flap fastening and second pocket with vertical zip fastening. Adjustable elastic at cuffs. Cotton terry lined hood. Hidden zip and button fastening." + }, + { + "uri": "https://ltho.s3.amazonaws.com/bfd9defc-a1ef-4322-9e53-9505ec606ed9.png", + "label": "RASO GOMMATO REVERSE COLOR PROCESS", + "code": "6215 42338", + "caption": "Jacket in Raso Gommato -rubberized satin- a mil. spec. cotton satin bonded with a polyurethane cover making the fabric wind and water resistant. In this version, the transparent cover is bonded to a previously piece dyed and printed the cotton satin. The finished garment undergoes an exclusive procedure named Reverse Color Process, a fading technique followed by an overdyeing process on the finished garment, owing to the piece unparalleled shaded print effects, resist print areas and residual color deposits, unique to each single item." + }, + { + "uri": "https://ltho.s3.amazonaws.com/390b68f3-7f9a-41af-a09c-bd15ac7008a3.png", + "label": "POLYPROPYLENE TELA", + "code": "6315 40534", + "caption": "Down filled parka in polypropylene tela treated with an anti-drop agent. Polypropylene, a material with antibacterial properties, is the lightest man-made fibre. Even very bulky garments astonish for their specific lightness. The paste colored yarn is texturized to obtain a cotton looking opaque aspect. " + }, + { + "uri": "https://ltho.s3.amazonaws.com/cc9f8c72-bbac-4d34-9762-4eae85374abf.png", + "label": "HIDDEN REFLECTIVE", + "code": "6315 G0598", + "caption": "Vest in a reflective, water and wind resistant polyester fabric owing its features to a coating made of thousands of glass microspheres. An opaque black plating totally covers the refraction of the material which is unveiled when photographed in flash mode. The reflective features will be revealed through usage, with diverse effects and intensities from piece to piece, depending on its wearer usage. Stone Island logo on the back obtained through laser printing. Filled with the finest down. Sheepskin over collar. " + }, + { + "uri": "https://ltho.s3.amazonaws.com/512029b0-f4a3-469a-9d7d-1cd7fc15c1c8.png", + "label": "POLY COVER COMPOSITE + POLY FUR SILVER DETACHABLE LINING", + "code": "6315 491Y1", + "caption": "Hooded jacket in Poly Cover Composite, a matte, colorless and opaque two-component water and wind resistant film. The garment dyeing technique colors the film without affecting its transparency. Completely heat sealed seams.\r\nDetachable hooded lining in Poly Fur, a synthetic fur with external silver colored coating. Snap fastening on nylon tape." + } + ], + "__index": "4", + "dateCreated": "Thu, 05 Nov 2015 01:48:39 GMT" + }, + { + "id": "-000-009", + "title": "'000'009", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/725e1b3f-58ee-49f6-8413-0a7e3dc9890f.png", + "label": "KEVLAR®", + "code": "3315 4031", + "caption": "Kevlar® felt. Five times more robust than steel given the same weight, Kevlar® is lightweight and\r\nhighly insulating. It is resistant to even extreme changes in temperature and to both fresh and salt\r\nwater. Owing to its qualities, it is used in the aerospace field, in competitive sailing and for Formula\r\n1 racing. With its soft yellow color, dyeing this material is usually impossible, but with Stone Island\r\ngarment dyeing expertise, laminating the hydro-cohered Kevlar® fibers to an invisible nylon mesh and\r\na polyurethane coating on the outer side and a simple polyurethane coating on the inside this has been\r\nmade possible.\r\nDetachable lining in triple woven fabric, two nylon honeycomb patterns have been machine raised\r\nwith a further nylon yarn. The detachable lining is attached to the outer garment using a system of ties,\r\nadapted from those used in the sailing world. Stone Island badge with white embroidery, reserved for\r\ngarments that are made using advanced research into fabrics or processes." + }, + { + "uri": "https://ltho.s3.amazonaws.com/c1c9db4f-5aa9-4698-9fe3-04a58a631653.png", + "label": "MONOFILAMENT-S", + "code": "3715 4316", + "caption": "Nylon twill monofilament mesh. On the inside, a cotton muslin\r\nlayer is laminated on the outer face with a black breathable\r\nand water resistant membrane, with the application of\r\nwhite polyester taped seams. The monofilament mesh has\r\na protecting function for the inner membrane. From the\r\naesthetic point of view, its transparency is designed to reveal\r\nthe internal construction of the garment. The piece is lined in\r\na brushed cotton fabric quilted with polyester padding. The\r\nfinished garment is over-dyed with a double cotton and nylon\r\nrecipe." + }, + { + "uri": "https://ltho.s3.amazonaws.com/4f1783c2-1ff7-4054-9d18-faebbd617305.png", + "label": "LIGHT", + "code": "3715 4Q30", + "caption": "Stone Island anticipated the use of light in clothing. Also for safety purposes in cases of\r\ndiminished visibility. The beginning of the Nineties, saw the introduction of the Reflective\r\nJacket - the first reflective garment ever - and in ‘002, to mark its twentieth anniversary,\r\nthe use of light went from being passive to active and self-generated with the use of optical\r\nfibres.\r\nThe fabric’s cotton warp is woven with polyester yarns as well as with optical fibre\r\nfilaments forming a band of light along the front fastening and around the edge of the hood.\r\nThe light is switched on using a small battery hidden inside the garment.\r\nHooded detachable lining in microfiber quilted to a polyester padding, attached to the\r\nouter garment using a system of ties, adapted from those used in the sailing world." + }, + { + "uri": "https://ltho.s3.amazonaws.com/c62f3de3-a639-4818-988c-3aba9db057e5.png", + "label": "COMPACT", + "code": "3915 4N40", + "caption": "Compact treated linen felt. The Compact process is the transfer to finished garments of a textile process that is usually used to cleanse the natural fibers of their impurities. The garments are boiled at 130°C under pressure, with special additives. In the finished garments the material shrinks approximately 50%, the material becomes extraordinarily compact, the hand of the fabrics becomes dryer and naturally elastic. The fabrics take on an uneven, hand crafted appearance, as if they had been woven on antique looms. The fabric volume reduction involved with the Compact treatment creates very important pattern making complexities. The garment can be fitted to the body with a strings and loops system on the sides, front and hood. This system is inspired by anti-G suits of military aviators. Garment dyed; Compact pieces are very receptive to the garment dyeing recipes, the colors result far more intense than those of untreated garments.\r\nDetachable lining in peached microfiber, quilted with polyester padding. The detachable lining is attached to the outer garment using a system of ties, adapted from those used in the sailing world." + }, + { + "uri": "https://ltho.s3.amazonaws.com/ba287902-7b92-4128-867f-69d6b1e40cc0.png", + "label": "OPAQUE NYLON TELA", + "code": "4315 4C24 30GR", + "caption": "Japanese featherweight nylon canvas, weighing just 30 grams per square\r\nmeter. The Stone Island badge is ultra light, in embroidered nylon mesh in\r\norder to avoid weighing down the sleeve. The garment is padded with the\r\nfinest down. The lightweight construction of the down bags and the direct\r\ninjection of feathers heightens the lightness of the garments." + }, + { + "uri": "https://ltho.s3.amazonaws.com/320c3a59-c8ae-4dec-b863-15b15ccc368a.png", + "label": "OPAQUE NYLON CANVAS", + "code": "4515 4H24", + "caption": "Japanese featherweight nylon canvas, weighing just 37 grams\r\nper square meter. The Stone Island badge is ultra light, in\r\nembroidered nylon mesh in order to avoid weighing down the\r\nsleeve. The garment is padded with direct injection finest down.\r\nApart from highlighting the lightness of the fabric, the black\r\nedging under the fabric underscores the removal of the feather\r\nbags to increase the lightness of the garment. The yoke on the\r\nchest is disguised by the horizontal quilting motive. Inside the\r\nhood of the garment, an extra fabric hood with external coating\r\nand PVC print may be laced up by loops." + }, + { + "uri": "https://ltho.s3.amazonaws.com/35f9ec2a-fc52-42e5-b015-899e40ae9e89.png", + "label": "DAVID-TC SUBLIMATION PRINT", + "code": "4615 4C44", + "caption": "Reversible garment. Star-shaped cross-section polyester / polyamide\r\nJapanese microfiber. During garment dyeing under pressure at 130°C,\r\nthe heat transforms the structure and hand of the material radically.\r\nBeyond the depth of color and despite maintaining an industrial\r\nappearance, the David-TC garments take on an appearance and\r\nhand that grant a unique tactile experience, similar to both chamois\r\nleather and non-woven coagulated fabric. One of the two faces has\r\nbeen over printed on the finished garment with a dark color, using\r\na hot sublimation / pressure printing technique that reveals the\r\nconstruction details of both sides of the garment." + }, + { + "uri": "https://ltho.s3.amazonaws.com/03785345-d63c-4c18-addf-fb7461949cec.png", + "label": "ANTIQUED REFLECTIVE", + "code": "4715 7423", + "caption": "Cotton Batavia with a coating made up of thousands of glass microspheres. Antiqued Reflective fabric\r\nhas a strong capacity to reflect even the weakest light sources and is enhanced by a color patina that is\r\nparticularly evident in the folds of the garment, granting to the piece a three-dimensional appearance.\r\nThe shape and details of the garment have been deliberately designed with a retro style in order to\r\ncreate a contrast with the modernity of the reflective face. The hood is lined in a khaki colored wool\r\nwith parallel stripes, reminiscent of military blankets.\r\nDetachable lining in microfiber quilted to a thin polyester padding. The lining is attached to the outer\r\ngarment using a system of ties, adapted from those used in the sailing world.\r\nStone Island badge with white embroidery, reserved for garments that are made using advanced\r\nresearch into fabrics or processes." + }, + { + "uri": "https://ltho.s3.amazonaws.com/b7b6db65-3688-4472-839d-38852b074790.png", + "label": "RASO GOMMATO - HAND PAINTED CAMOUFLAGE", + "code": "4915 4C43", + "caption": "Drawing inspiration from the actions of soldiers during the First World War, who\r\nused earth from the trenches to make their uniforms dirty, thus inventing the\r\nconcept of camouflage, the fabric base in black satin weave cotton of military\r\norigin bonded to a black polyurethane cover on the inner face, has been faded\r\nwith a corrosive paste and then hand painted on the finished garment to create\r\na camouflage effect. By means of this manual process, each garment is rendered\r\nunique and unrepeatable.\r\nThe detachable quilted nylon lining with polyester padding, with front edging\r\nand collar in felted wool, is attached to the outer garment using a system of ties,\r\nadapted from those used in the sailing world." + }, + { + "uri": "https://ltho.s3.amazonaws.com/9a25ed8c-2293-4d6e-b63a-c17580113d63.png", + "label": "WAXED ICE - THERMO SENSITIVE FABRIC", + "code": "5115 7498", + "caption": "Cotton moleskin with a resin treatment containing thermo sensitive\r\nquartz. The color of the garment ranges from bright yellow at\r\nroom temperature to a deeper and deeper shade of olive green as\r\nthe temperature drops. The garment is washed and then waxed.\r\nThe detachable black woolen lining with Stone Island logo in the\r\ncentre is attached to the outer garment using a system of ties,\r\nadapted from those used in the sailing world.\r\nStone Island badge with white embroidery, reserved for garments\r\nthat are made using advanced research into fabrics or processes." + } + ], + "__index": "3", + "dateCreated": "Thu, 05 Nov 2015 01:49:03 GMT" + }, + { + "id": "-990-999", + "title": "'990'999", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/f58db57f-a469-4c7b-b248-6cab5a927c8a.png", + "label": "RASO GOMMATO COLORED COVER", + "code": "05 4001", + "caption": "Satin weave cotton of military origin bonded to a\r\nmustard yellow polyurethane cover on the outside\r\nand white on the hood. The inner fabric face takes its\r\ncoloring from garment dyeing. Double parallel row\r\nof snap fasteners mounted on small rubber disks\r\nallow the garment to be tightened or loosened to fit." + }, + { + "uri": "https://ltho.s3.amazonaws.com/56189889-630b-4293-95e9-2c747d1209fe.png", + "label": "ICE JACKET CAMOUFLAGE THERMO-SENSITIVE FABRIC", + "code": "05 4N06", + "caption": "Cotton poplin with a camouflage print in a thermo-sensitive\r\ncoating with liquid crystals that change color based on\r\nthe temperature. Over dyed on the finished garment. As the\r\ntemperature drops, the fabric print gradually disappears\r\nas it takes on the same shade as the solid color of the\r\ngarment dye." + }, + { + "uri": "https://ltho.s3.amazonaws.com/d46fc981-d51c-4001-a72a-7d5bc3bedc15.png", + "label": "RUBBERISED SATIN SILVER COVER", + "code": "35 4405", + "caption": "Satin weave cotton of military origin bonded to a silver\r\npolyurethane cover on the outside. Padded with goose down.\r\nDouble parallel row of snap fasteners mounted on small rubber\r\ndisks allow the garment to be tightened or loosened to fit.\r\nLining in colored peached polyester microfiber. Hood in the\r\nRaso Gommato Silver Cover garment dyed, with detachable wolf\r\nfur edging." + }, + { + "uri": "https://ltho.s3.amazonaws.com/65a6a008-a634-4155-8dba-0e2f22e1dc74.png", + "label": "REFLECTIVE JACKET", + "code": "1815 4N02", + "caption": "Owing to a coating made up of thousands of glass\r\nmicrospheres on a polyester base, the Reflective\r\nfabric has a strong capacity to reflect even the\r\nweakest light sources. It reflects and intensifies\r\nthe brightness of the color of the fabric itself,\r\nparticularly if placed in the dark. If it is photographed\r\nusing a flash, it detracts light from the other\r\ncomponents in the shot, which show up as black.\r\nPocket linings in cotton mesh." + }, + { + "uri": "https://ltho.s3.amazonaws.com/7011fe4a-22de-4bf0-bd4d-4440c49d8409.png", + "label": "WQR WATER RESISTANT QUILTING", + "code": "2515 6L51", + "caption": "Nylon jersey quilted with polyester padding,\r\nwith a special external coating used to close\r\nall the needle holes produced in the quilting\r\nprocess, rendering the garment totally\r\nwaterproof. The garment takes its final\r\ncoloring from garment dyeing." + }, + { + "uri": "https://ltho.s3.amazonaws.com/ca0447d1-3bd3-4702-a7d5-f1da98764ffb.png", + "label": "LINO GOMMATO REVERSE COLOR PROCESS", + "code": "2815 4P49", + "caption": "Black linen canvas bonded to a transparent polyurethane\r\ncover on the outside. By means of an exclusive process\r\ncarried out on the finished garment, the original color of\r\nthe fabric is corroded, with the exclusion of the Stone Island\r\nlettering, of the two parallel stripes and of the name of the\r\nprocess on the left sleeve. The collar, placket, pocket flaps,\r\ncuffs and bottom hem are less faded owing to the double\r\nlayer of fabric and the seams. Light garment over dye." + }, + { + "uri": "https://ltho.s3.amazonaws.com/23b746d9-311b-4f9f-b356-d1f49046bda9.png", + "label": "THE PRESIDENT’S KNIT", + "code": "2915 5784", + "caption": "The President’s Knit is the name of a knitted garment introduced in the autumn winter ‘998-’999\r\nseason and then retaken with different processes in the years that followed. It is an innovative knitted\r\ngarment that takes on the functions of a jacket owing to its detachable lining.\r\nThe first of these garments was created in a double face knit, nylon chenille on the outside, cotton on\r\nthe inside. Three black nylon parallel stripes on the cuff. Ends of the sleeves and bottom hem as well\r\nin black nylon. The garment takes its final coloring from garment dyeing.\r\nDetachable lightweight nylon fabric lining with water resistant polyurethane resin finish, quilted\r\nwith polyester padding. The detachable lining is attached to the outer garment using a system of ties,\r\nadapted from those used in the sailing world." + }, + { + "uri": "https://ltho.s3.amazonaws.com/ebaf6ae8-f465-4a8d-b6d0-ff45a93f0350.png", + "label": "LAMINATE - NOC 1", + "code": "3015 4C41", + "caption": "Two ultra light cotton gauzes laminated by means of a\r\nmatte colored resin. This slightly stretch fabric provides\r\ntechnical features owing to its light lamination. This fabric\r\nhas a natural appearance but high-tech performance and\r\nis waterproof, windproof and breathable. Fully thermotaped\r\nseams on the inside.\r\nInjection moulded PVC NOC 1 hood. The shape of the\r\nhood is taken by the shape of gas masks. A research by\r\nStone Island into the making of non-fabric components." + }, + { + "uri": "https://ltho.s3.amazonaws.com/a39caa9e-4dbe-4c31-8bda-41ebc2a508b4.png", + "label": "PURE METAL SHELL – BRONZE", + "code": "3115 4T43", + "caption": "100% bronze mesh applied to a black nylon jersey base. The polyurethane adhesive\r\nprovides a light protection for the mesh. A Teflon® treatment makes the garment water\r\nresistant. The metal mesh is a living material with the features of metallic materials when\r\nused untreated, and therefore they are subject to oxidation over time, losing its shine.\r\nThe worn look, creases and breaks that form on the surface are features that make each\r\ngarment different from the next.\r\nDetachable woolen lining with raw cut edging, attached to the outer garment using a\r\nsystem of ties adapted from those used in the sailing world.\r\nThe Autumn Winter ´999-´000 collection saw the introduction of the Stone Island badge\r\nwith white embroidery, dedicated to garments created using advanced research into\r\nfabrics or processes." + }, + { + "uri": "https://ltho.s3.amazonaws.com/f221b596-7cc0-493c-9cea-6755f64d1641.png", + "label": "PURE METAL SHELL - SILVER SPRAY", + "code": "3115 4U39", + "caption": "Ultra light polyester fabric with the application, through\r\na patented procedure, of a micro stainless steel film in a\r\nvacuum and sterile environment. This Japanese fabric,\r\nused in airplanes to shield the on-board computers from\r\nelectromagnetic radiation. Cotton canvas lining. The garment is\r\npadded with goose down.\r\nThe Autumn Winter ´999-´000 collection saw the introduction\r\nof the Stone Island badge with white embroidery for pieces\r\ninvolving advanced research." + } + ], + "__index": "2", + "dateCreated": "Thu, 05 Nov 2015 01:49:20 GMT" + }, + { + "id": "-982-989", + "title": "'982'989", + "__index": "1", + "dateCreated": "Wed, 02 Dec 2015 05:15:20 GMT", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/e486c7c7-798e-4bf7-9e67-973f2cb02368.png", + "label": "TELA STELLA", + "code": "45 4NN", + "caption": "Stone Island was founded on this fabric. Tela Stella was born out of the study\r\nof the technical and functional characteristics of military truck tarpaulins. It\r\nis a cotton canvas impregnated on both sides with special pigmented resins\r\nin contrasting colors. The finished garment then undergoes an extended\r\nenzyme wash in order to give it a faded look and to break down the density of\r\nthe material. The result is a windproof garment that has an air of old oilskins\r\ncorroded by the sea, which, at the same time, has a marked military feel." + }, + { + "uri": "https://ltho.s3.amazonaws.com/757164f9-0699-482a-9187-e7d097f84319.png", + "label": "TELA STELA DUAL COATED", + "code": "65 404", + "caption": "Cotton canvas impregnated on both sides with special pigmented resins in contrasting colors.\r\nWhite outside, sand colored inside. Garment dyed midnight blue; a mélange effect is obtained with\r\ndifferent textured depths of color on the outside and inside of the garment. Appliqués in reflective\r\nfabric and stretch cotton tape on the pockets. Metal buckles on the bottom hem. Long cotton strap\r\nsewn under the collar label and attached to one of the buckles by means of a snap hook to allow the\r\ngarment to be worn over the shoulders." + }, + { + "uri": "https://ltho.s3.amazonaws.com/eb9cadb6-9712-41cf-9984-086518c7c391.png", + "label": "TELA STELLA DUAL COATED", + "code": "65 410", + "caption": "Cotton canvas impregnated on both sides with special pigmented resins in\r\ncontrasting colors. White outside, sand colored inside. Neither washed,\r\nnor garment dyed, it maintains the body and intensity of the coating.\r\nAppliqués in reflective fabric and stretch cotton tape. Adjustable straps at\r\nthe sides." + }, + { + "uri": "https://ltho.s3.amazonaws.com/8237f317-5272-4760-a6ab-b56c475b50d3.png", + "label": "JOCK-23", + "code": "75 436", + "caption": "Cotton canvas with thick matte PVC coating. Appliqués in the same fabric\r\nwith contrasting color coating. On the back, appliqué in mélange felted wool\r\npolyester on the collar. On the inside the neckline and shoulders are lined\r\nin cotton jersey. Rubber buttons created from a mould. Detachable lining in\r\ngarment dyed cotton fleece, attached with snap fasteners." + }, + { + "uri": "https://ltho.s3.amazonaws.com/c790cbf7-0a92-449e-8557-f6174946ab68.png", + "label": "JOCK-23", + "code": "75 460", + "caption": "Cotton canvas with thick matte PVC coating. Hood and buckled inserts at the cuff, with\r\ncontrasting color coating. Appliqué in latex right around the edge. Metal eyelets.\r\nRubber buttons created from a mould." + }, + { + "uri": "https://ltho.s3.amazonaws.com/1062f397-c1d7-4012-ae8d-9ddf13363743.png", + "label": "JOCK-23", + "code": "75 409", + "caption": "Cotton canvas with thick matte PVC coating. Inner flap in a contrasting\r\ncolor. Collar in felted wool polyester, lined with latex. Latex band at cuffs.\r\nRubber buttons created from a mould. Detachable lining in garment dyed\r\ncotton fleece, attached with snap fasteners." + }, + { + "uri": "https://ltho.s3.amazonaws.com/5f315b73-1572-460c-abfe-cda498886abe.png", + "label": "RASO GOMMATO BLACK COVER", + "code": "35 4NN", + "caption": "Satin weave cotton of military origin bonded to a black\r\npolyurethane cover on the inside. The garment takes its\r\nfinal coloring from garment dyeing. Detachable hood in Silk\r\nLight, an ultra light, slightly resin treated shiny trilobate nylon\r\nfabric, quilted with polyester padding.\r\nDetachable lining in Silk Light, quilted with polyester padding.\r\nThe detachable lining is attached to the outer garment using\r\na system of ties, adapted from those used in the sailing world.\r\nThe hood and detachable lining are also garment dyed." + }, + { + "uri": "https://ltho.s3.amazonaws.com/cd370f63-4fab-41e1-bbb6-d9e4955d068e.png", + "label": "GLAZED SILK LIGHT", + "code": "55 4910", + "caption": "Fine shiny trilobate nylon with thick, glazed effect\r\nPVC coating, creating a translucent, semi-transparent\r\nappearance. Hood part lined in a layer of PVC and with a\r\nstrip of honeycomb pattern non-woven fabric in microfibre.\r\nPVC windproof cuffs inside the sleeves. Lining made with\r\na layer of heat-sealed PVC, with interlining in polyester\r\nmesh quilted with polyester padding. The piece takes its\r\nfinal color from a double cotton and nylon garment dyeing\r\nrecipe, to obtain different shades on the finished garment." + }, + { + "uri": "https://ltho.s3.amazonaws.com/417e64df-f318-4500-977b-2eaed1668bc4.png", + "label": "RASO GOMMATO BLACK COVER", + "code": "65 4A10", + "caption": "Satin weave cotton of military origin bonded to a\r\nblack polyurethane cover on the inside. Removable\r\neye mask in the hood, which folds away in the\r\ncollar. The garment takes its final coloring from\r\ngarment dyeing." + }, + { + "uri": "https://ltho.s3.amazonaws.com/93d8d8fa-ad6e-4fe5-9182-c9e45c7e4ff5.png", + "label": "NYLON RIP-STOP COVER", + "code": "75 4503", + "caption": "Khaki iridescent nylon with rip-stop twill, laminated on the\r\noutside with a transparent amber polyurethane film. The\r\ndepth of color is obtained by adding together the color of\r\nthe textile base and that of the coating. Lined in iridescent\r\nnylon rip-stop quilted with polyester padding." + } + ] + } + ], + "hub": [ + { + "id": "ss_-016-over-shirt-in-nylon-metal", + "date": "Tue, 26 Jan 2016 12:00:00 GMT", + "title": "SS_’016 Over Shirt in Nylon Metal", + "subtitle": "Stone Island App Exclusive Colorway", + "body": "NYLON METAL: The trilobate structure of the nylon yarn, with its grey weft and white ready to dye warp colors, is the grounds of the distinctive metallic and tonic sheen of Nylon Metal, one of the most versatile fabrics born of Stone Island’s textile research. The finished piece undergoes an elaborate double dye procedure providing different tones, intensities and colors to the fibers and textile accessories of the garment. The addition of a special agent to the dye formula makes the piece anti-drop.", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/5f8ea79e-89b1-497a-a64d-ab1616a73d14.JPG", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/dcbdc373-b95c-4891-86ba-6dc39e13f49d.JPG", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/6828eb54-ebbf-412f-a246-5b208f8e6733.JPG", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/0ef84bf3-5b79-4e34-b115-9a31821cec24.JPG", + "caption": "" + } + ], + "__index": "1", + "dateCreated": "Tue, 26 Jan 2016 15:31:47 GMT" + }, + { + "id": "ss_-016-collection-preview", + "date": "Tue, 12 Jan 2016 12:00:00 GMT", + "title": "SS_'016 COLLECTION PREVIEW", + "subtitle": "Stone Island App exclusive 1/12-1/19", + "body": "The unrelenting research by Stone Island results in a collection full of textiles evolutions, finishing and dyeing, featuring pop colors and extraordinary visual effects.\r\n\r\n44447 NYLON METAL WATRO\r\nHooded blouson in Nylon Metal. Hood with half lining in cotton and half in nylon mesh. Slanting hand pockets with windproof entrance and zip fastening. Adjustable strap at cuffs. Drawstring in bottom hem. Zip fastening. \r\nNYLON METAL WATRO: The trilobate structure of the nylon yarn, with its grey weft and white ready to dye warp colors, is the grounds of the distinctive metallic and tonic sheen of Nylon Metal, one of the most versatile fabrics born of Stone Island’s textile research. The fabric is resin treated inside to achieve a mild wind and water resistance The finished piece undergoes an elaborate double dye procedure providing different tones, intensities and colors to the fibers and textile accessories of the garment. The addition of a special agent to the dye formula makes the piece anti-drop.\r\n\r\n10544 NYLON METAL \r\nOver shirt in Nylon Metal. Garment dyed. Hook fastening collar. On seam pocket along central placket, with snaps fastening. Snap-fastened cuffs. Hidden zip and snap fastening.\r\nNYLON METAL: The trilobate structure of the nylon yarn, with its grey weft and white ready to dye warp colors, is the grounds of the distinctive metallic and tonic sheen of Nylon Metal, one of the most versatile fabrics born of Stone Island’s textile research. The finished piece undergoes an elaborate double dye procedure providing different tones, intensities and colors to the fibers and textile accessories of the garment. The addition of a special agent to the dye formula makes the piece anti-drop.\r\n\r\n70532 POLYESTER SHANTUNG\r\nParka in an organic looking polyester. Hood with visor and chin strap adjustable with Velcro. Two bellows pockets on chest with flap closed by hidden snaps. Two welt pockets closed by a zip with a second snap opening that holds a cotton tape belt. Snap fasteners at cuffs. Zip and hidden button fastening.\r\nPOLYESTER SHANTUNG: organic looking polyester material with a shantung effect. The organic look is given by the highly technological spinning of the raw material and by its super tight weaving. The pieces are sewn and then garment dyed under pressure at 130°C with the addition of an anti-drop agent. The high pressure dye process compacts the material and induces the high absorption of the color recipe.\r\n\r\n41923 MEMBRANA 3L TC\r\nHooded jacket in a light 3 layers fabric. Garment dyed. Adjustable straps on hood with elasticated gathering on back. Patch pockets with zip fastening. Adjustable straps at cuffs. Elasticated adjustable drawstring on bottom edge. Zip fastening. \r\nMEMBRANA 3L TC: 3 layer light performance fabric made from an opaque nylon outer face laminated to a breathable, water resistant, windproof membrane, protected by an impalpable polyester base. Stone Island’s expertise in garment dyeing gives an outstanding color to the outer face while preserving the performance features of the inner membrane. The addition of a special agent to the dye formula makes the piece anti-drop.\r\n\r\n65260 T.CO+OLD\r\nHooded full zip sweatshirt in malfilé cotton, garment dyed to create the OLD effect, an exclusive dyeing treatment and subsequent fading on the finished garment to create a slightly worn and three-dimensional appearance. Hood drawstring in contrasting color. Pouch pockets. Ribbed side band, cuffs and bottom band. Zip fastening.\r\n\r\n530B0\r\nCardigan knit in plain stitching cotton nylon. Raised collar with concealed hood in Nylon Metal. Garment dyed. On seam pockets. Plain cuffs and bottom band with inner ribbing. Zip fastening.\r\nNYLON METAL: The trilobate structure of the nylon yarn, with its grey weft and white ready to dye warp colors, is the grounds of the distinctive metallic and tonic sheen of Nylon Metal, one of the most versatile fabrics born of Stone Island’s textile research. ", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/76ecda74-afef-406b-9b17-2d940700a1f6.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/f96e6884-f558-4da4-bce6-dc6fa4137442.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b22d0c15-e948-4b74-b275-c25cfdd824ec.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/2d5d5ced-3383-4203-affc-3fd0aff991b3.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/5698df03-ab54-4f08-ac64-5bdde9e9ba05.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/36c356ef-ffbd-47b4-8103-3310fc46eb6e.png", + "caption": "" + } + ], + "__index": 2, + "dateCreated": "Wed, 27 Jan 2016 01:57:35 GMT" + }, + { + "id": "nikelab-x-stone-island-windrunner", + "date": "Wed, 09 Dec 2015 12:00:00 GMT", + "title": "NikeLab x Stone Island Windrunner", + "subtitle": "", + "body": "<b>NikeLab partners with Stone Island to deliver a unique interpretation of its foremost apparel icon, to celebrate the beginning of “The Year of Windrunner.</b>\r\n\r\n “An exciting co-lab. Stone Island loves challenges. We source our strength from challenges. It’s a great satisfaction to share our knowhow and expertise with Nike”.\r\n<i>Carlo Rivetti – Stone Island President and Creative Director</i>\r\n \r\nThe Nike Windrunner was born during a time of firsts. Created by Nike’s first apparel designer in 1978 and revolutionary for its raglan sleeves and 26-degree chevron yoke, the jacket became the first piece of Nike apparel worn by athletes at track and field trials before and after competition. Today, to commemorate this running icon, the Nike Windrunner experiences another first, the fabric innovation, the engineering and garment dyeing techniques of Stone Island.\r\n \r\nIn 2016 Nike is celebrating its foremost apparel icon: the Nike Windrunner Jacket. Designed in the late ‘70s, the silhouette has been a fixture on medal stands and city streets ever since. In the launch edition of this yearlong celebration Nike and Stone Island merge the distinctiveness of two brands to create a unique garment.\r\n \r\nThe chevron and hood of the NikeLab x Stone Island Windrunner are constructed with water and wind-resistant Mussola Gommata fabric, formed by bonding lightweight cotton muslin to an opaque polyurethane film. Nylon Metal, a proprietary Stone Island fabric with a metallic sheen, is featured on the body of the garment, which is lined with PrimaLoft®.\r\n \r\nWhile the exterior of the jacket is monochromatic, it mimics the traditional Nike Windrunner color blocking through Stone Island’s garment dyeing process. The result is a subtle distinction between the shades of the Mussola Gommata and Nylon Metal fabrics. The silver PrimaLoft® lining provides a stunning contrast to the monochromatic exterior, while the oversized trims contribute to a rugged look.\r\n \r\nThe NikeLab x Stone Island Windrunner will be available on December 17th at 10am PST from the Stone Island App and selected NikeLab retailers and on nike.com/nikelab.", + "link": "http://www.stoneisland.com/experience/us/nikelab-x-stone-island/", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/83cc1844-73f2-4b76-b968-4d8225d84c5b.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/ae57c043-dc9c-43fb-a64f-867cece10c77.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/ea1b402b-fc94-4363-aa97-88806b6aadd1.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/bdcfd9d4-ae84-45de-8d80-3c91c8f8ce81.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/1c194494-d6e6-45ed-8a00-d4c337c2a104.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/83832a1b-14e7-41d2-afc9-12956cae78c9.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/944abccb-b2d0-40ee-88eb-7ee027127878.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/35290536-15b7-43de-9bbe-e3ee199fe520.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b3538dbb-b203-49d4-93b7-59826fcf6298.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/9e5f54c7-ae5d-432a-b45e-2cbc2c98970c.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/eb961f79-587a-4df6-bac3-7159b313a6c2.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/eada5a2f-0de2-4a40-9e7a-409e1de28b4e.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b8264d5d-d0cf-4e84-a7d2-0e241f7337c2.png", + "caption": "" + } + ], + "__index": "3", + "dateCreated": "Wed, 27 Jan 2016 01:58:22 GMT" + }, + { + "id": "nikelab-x-stone-island-koth-ultra-mid-si", + "date": "Wed, 09 Dec 2015 12:00:00 GMT", + "title": "NikeLab x Stone Island Koth Ultra Mid SI", + "subtitle": "", + "body": "Inspired by the Nike Air Mowabb, the revolutionary 1991 sneaker-hiker hybrid, this all-weather Nike Koth Ultra Mid SI Shoe is made in Nike water resistant materials, real leather, and in Mussola Gommata, a fabric issued from the Stone Island research and treatment research, an exclusive panel dyed material made by bonding an extremely light cotton muslin to an opaque polyurethane film. The shoe features aggressive traction and flexible ankle support. Unitsole foam midsole for cushioning and durable support. Waffle rubber lugs for rugged traction and durability. Flex grooves allow for natural range of motion. Heel loop for easier on and off. Heel overlay for enhanced support. The shoe dust bag is made in 2 Stone Island fabrics, Nylon Metal, nylon canvas with a distinctive metallic and iridescent sheen, 50 Fili, a cotton/nylon canvas, both panel dyed.\r\n\r\nThe NikeLab x Stone Island Koth Ultra Mid SI will be available on December 17th at 10am PST from the Stone Island App and selected NikeLab retailers and on nike.com/nikelab.", + "link": "http://www.stoneisland.com/experience/us/nikelab-x-stone-island/", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/783b5830-6f63-41df-ad3e-22e8a6ecb640.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/332d5d23-1661-4444-b9d3-fcebda25e17d.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/66ad13cd-11cd-477d-af29-1bac747c7fc7.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/f11681bb-e698-4206-a147-4083ef881180.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4ae2c8e5-a7b0-4787-a564-86efee2a75f8.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/f88aa2e4-0359-4114-855c-f742c3347217.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/3adb8ecb-e656-40fd-b1d3-26afd25c1443.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/e13421b7-ace5-4540-a051-a6aaba198092.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4ff448bf-bd24-40a2-86ff-ead87e3abc95.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/0ed0705a-7804-4ecb-871e-fb7da49d17c3.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/db63550e-4026-4dac-ae8c-23ae0c4ddcbf.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/7cde7501-df12-4849-9dc6-24e09917da4f.png", + "caption": "" + } + ], + "__index": 4, + "dateCreated": "Wed, 27 Jan 2016 02:06:13 GMT" + }, + { + "id": "45546-garment-dyed-pixel-reflective-", + "date": "Thu, 11 Feb 2016 12:00:00 GMT", + "title": "45546 GARMENT DYED PIXEL REFLECTIVE ", + "subtitle": "APP EXCLUSIVE 2/11 - 2/15", + "body": "GARMENT DYED PIXEL REFLECTIVE: STONE ISLAND’s research introduces garment dyeing on reflective fabrics. The landmark iridescent Nylon Metal fabric is printed with a resin substance containing thousands of glass microspheres. The garment dyeing procedure lends extraordinary colors to the textile base while the Pixel Reflective printing provides it with a strong capacity to reflect even the weakest light sources. A special agent was added to the dyeing bath for an anti-drop effect.\r\n\r\nLong Bomber jacket in Pixel reflective fabric. Garment dyed. Ribbed neckline and cuffs. Flap pockets with button flap on front. Straight pocket on chest with nylon tape edge. Windproof pocket with Velcro fastening on arm. Zip fastening.", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/6184e4f6-a1f5-483a-8151-4f425ea49da3.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/e179b0eb-9476-41a5-9a83-ccc9ce824d78.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/e451542c-392f-4fcc-ad80-142ab3551f16.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/8c593568-64c8-4bd2-bcab-d90ed83438f8.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/adb18f34-2968-4981-a5d1-a81a09f7e9c3.jpg", + "caption": "" + } + ], + "__index": "5", + "dateCreated": "Thu, 11 Feb 2016 15:01:24 GMT" + }, + { + "id": "stone-island_los-angeles", + "date": "Tue, 23 Feb 2016 12:00:00 GMT", + "title": "STONE ISLAND_LOS ANGELES", + "subtitle": "", + "body": "Stone Island opens first US retail location at 145 S La Brea Ave, Los Angeles.\r\n\r\nThe destination offers Stone Island collections, alongside curated brand experiences and presentations.\r\n\r\nThe store’s inaugural exhibition features “Reflective Research ‘992 — ‘015” which will run through March 13th, 2016\r\n\r\nSTONE ISLAND_LOS ANGELES\r\n145 S La Brea Avenue, Los Angeles, CA 90036\r\n\r\nMonday - Saturday 11AM - 7PM\r\nSunday - 11AM - 6PM", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/9d82d33c-e9ea-47b4-8aeb-8e316843bca8.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4029fc99-1fa6-41ce-b0b2-bf05657333d1.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/d40cf381-c20f-4577-8326-e2f31e10875a.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/0749fbcf-1bfc-41b2-8540-5c6d358eddd3.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4c13a8cc-c47e-4837-95b5-70a69f111a21.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/90c03aa2-869b-48b5-87aa-da22bffac4a7.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/a0807612-4ee0-494e-9820-c0426b3ac166.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/44ab5342-68d2-410c-90e5-2130f2fdc80d.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/c4aa9eea-7446-4309-a885-cdd50078880e.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/44342be6-39ef-4612-b76f-aa1c0c1b9a9c.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/60ae0f89-3d2d-4f6e-885c-fd3f2797c8a0.jpg", + "caption": "" + } + ], + "__index": "6", + "dateCreated": "Tue, 23 Feb 2016 18:02:12 GMT" + }, + { + "id": "stone-island-ss_-016-icons", + "date": "Wed, 24 Feb 2016 12:00:00 GMT", + "title": "Stone Island SS_'016 Icons", + "subtitle": "", + "body": "", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/afb364d3-a8fc-40e1-a922-d93d57a10f07.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/ccbcec28-fe70-4f60-8806-2dcce06b3121.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/af25c582-bca2-4365-b8f8-a262eae0e1ac.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/408d6ecb-fa1f-4d65-9e29-3e94574ff26a.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/6df375f6-9261-46e2-994a-b48b4b2b33c4.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/f6eb87a7-ffbb-4a65-a3e4-299c8d22f0a9.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4593fb77-3bc7-475a-ac56-a42f3a40d2ef.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/8d7f419b-5342-4ccc-beeb-8354cc5823a1.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/8169511b-c904-42cf-8f26-077df472d6a9.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/adf18770-73fb-4f4b-bf9a-20efd5f72a53.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/30c9f8f4-92cb-4f51-a050-0d54e73dc862.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/cf274bc6-2690-4625-9902-5417d257e7e5.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/3a16057d-b939-4d82-b9b5-5f3ba5019dd8.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b9baed9e-f7b5-46d8-bedf-bdf479a73797.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/fc14ba8f-920a-490b-b881-2bfea3c225cc.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/cf6f23c9-f24a-4a5c-945c-4ceed52c655f.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/061184a8-adef-4630-8fa7-527ba6a83d93.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/24c11eff-4795-4782-b8f2-8f92edfb428e.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/a7bab9ac-e23e-4f65-96b8-1dbbcef0299f.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b49d11ad-02f6-4f5a-ae7b-dbc0d5782141.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/ea63d777-09f9-4813-b348-aafef19f5137.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/08c31779-5223-479a-b242-dcb7c9185d71.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/79058530-adc3-4415-9a01-268731f8c439.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b5c527a5-dd95-4bfd-91d3-ae269d9aa31e.png", + "caption": "" + } + ], + "__index": "7", + "dateCreated": "Wed, 24 Feb 2016 19:18:05 GMT" + }, + { + "id": "44537-water-repellent-wool-ghost-piece-", + "date": "Tue, 01 Mar 2016 12:00:00 GMT", + "title": "44537 WATER REPELLENT WOOL - GHOST PIECE ", + "subtitle": "APP EXCLUSIVE 3/1 - 3/7", + "body": "WATER REPELLENT WOOL: 100% naturally water repellent wool. The specific fiber processing allow increased yarn contractility and the ultra-tight compact density weaving with high temperature finishing make the fabric windproof, breathable and water repellent without the need of chemicals, coating or lamination techniques.\r\n\r\nHooded jacket in water repellent wool. Diagonal pockets with zip fastening. Two pockets with slanting flap closed by hidden snaps on chest. Heat sealed tapes on inner seams. Tyvek® half lining with nylon mesh, in the hood as well. Hidden zip and snap fastening. \r\n\r\nGhost pieces are based on the concept of camouflage and are entirely monochromatic. Even their STONE ISLAND badges have been created in special mono-color versions to blend with the garment.", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/f5ceb26d-9830-4103-a29a-974c352617bf.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/48728c3c-5ee9-4b4c-abf3-5577eddab822.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/13fad590-9dd7-4529-a7e0-2e2685351bc8.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/c4ac3668-67b4-4287-bf87-f12df58c96c4.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/e4dd378e-034d-49cf-a683-7d267cb8e7c7.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/264d3e31-cf18-4e88-866c-feff0fd5377e.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/69d6714a-5b78-46f0-917e-2765f7ece13f.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/0b278eda-2223-4d73-874b-c4b1f163d0c8.png", + "caption": "" + } + ], + "__index": "8", + "dateCreated": "Tue, 01 Mar 2016 15:00:17 GMT" + }, + { + "id": "stone-island-supreme-", + "date": "Mon, 14 Mar 2016 12:00:00 GMT", + "title": "Stone Island / Supreme ", + "subtitle": "Co-Lab SS '016_Preview", + "body": "Third collaboration with the cult US skate brand Supreme.\r\nOuterwear, lightweight garments and accessories represent the fusion between the fabric research of Stone Island and the iconic style of Supreme.\r\n\r\nIN THE US AND CANADA THE CO-LAB WILL BE AVAILABLE FROM MARCH 17TH ON THE FOLLOWING CHANNELS: \r\nSTONE ISLAND APP AND STONE ISLAND LOS ANGELES STORE. SUPREME NEW YORK AND LOS ANGELES STORES, SUPREME APP AND ONLINE STORE.\r\n\r\nSTONE ISLAND FOR SUPREME \r\n701S1 HEAT REACTIVE – THERMOSENSITIVE FABRIC\r\nTrench coat in Heat Reactive fabric, changing color depending on temperature. The molecules of the micro pigments encapsulated in the coating change the path of light, the garment gradually turns to a lighter color as the temperature rises and becomes darker again as it drops.\r\nDetachable hood. Hand pockets with hidden snap fastening. Strap at cuffs, adjustable through snaps. Central back slit with hidden snap fastening. Hidden buttons fastening.Stone Island badge with white embroidery, reserved for garments that are made using advanced research into fabrics or processes. \r\n\r\nSTONE ISLAND FOR SUPREME \r\n401S2 NYLON METAL\r\nTrack Jacket in NYLON METAL. One of the most versatile fabrics born of Stone Island textile research. The trilobate structure of the nylon yarn and the grey weft/white warp color weave are the grounds of its distinctive metallic and iridescent sheen, when garment dyed. The finished piece undergoes an elaborate double dye procedure providing different tones, intensities and colors to the fibers and textile accessories of the garment. The addition of a special agent to the dye formula makes the piece anti-drop.\r\nStand up collar. Tonal Supreme water based print on left sleeve. Welt pockets on front with double snap fastening. Elasticated cuffs and bottom band. Inner nylon mesh lining. Zip fastening.\r\n\r\nSTONE ISLAND FOR SUPREME \r\n401S3 NYLON METAL 4C PRINTED\r\nTrack Jacket in NYLON METAL 4C PRINTED. Nylon Metal is one of the most versatile fabrics born of Stone Island textile research. The trilobate structure of the nylon yarn and the grey weft/white warp color weave are the grounds of its distinctive metallic sheen. The fabric is printed with a 4 color pigment Supreme camouflage motif. The garment is washed at 40°C (104°F) with the addition of a special anti-drop agent.\r\nStand up collar. Supreme water based print on left sleeve. Welt pockets on front with double snap fastening. Elasticated cuffs and bottom band. Inner nylon mesh lining. Zip fastening.\r\n\r\nSTONE ISLAND FOR SUPREME \r\n301S2 NYLON METAL\r\nTrack Pants in NYLON METAL, one of the most versatile fabrics born of Stone Island textile research. The trilobate structure of the nylon yarn and the grey weft/white warp color weave are the grounds of its distinctive metallic and iridescent sheen, when garment dyed. The finished piece undergoes an elaborate double dye procedure providing different tones, intensities and colors to the fibers and textile accessories of the garment. \r\nTonal Supreme water based print on left leg. On seam hand pockets with snap fastening. One slit back pocket with hidden zip fastening. Elasticated waistband with inner drawstring. Elasticated leg bottom with side zip fastening. Inner nylon mesh lining.\r\n\r\nSTONE ISLAND FOR SUPREME \r\n301S3 NYLON METAL 4C PRINTED \r\nTrack Pants in NYLON METAL 4C PRINTED. Nylon Metal is one of the most versatile fabrics born of Stone Island textile research. The trilobate structure of the nylon yarn and the grey weft/white warp color weave are the grounds of its distinctive metallic sheen. The fabric is printed with a 4 color pigment Supreme camouflage motif. The garment is washed at 40°C (104°F). \r\nSupreme water based print on one leg. On seam hand pockets with snap fastening. One slit back pocket with hidden zip fastening. Elasticated waistband with inner drawstring. Elasticated leg bottom with side zip fastening. Inner nylon mesh lining.\r\n\r\nSTONE ISLAND FOR SUPREME \r\n501S7 COMPASS PIN SWEATER IN PIMA COTTON\r\nCrewneck sweater in 100% Pima Cotton. By using only selected long staples, Pima cotton has a superior soft hand and extra smooth feel.\r\nReflective tonal Stone Island/Supreme Compass Pin transfer print on chest. Ribbed cuffs and bottom band.\r\n\r\nSTONE ISLAND FOR SUPREME\r\n201S4 ALL OVER PLACED PRINT \r\nLong-sleeve T-Shirt in slightly raw cotton. The striped motif is pigment printed. The cutting of the piece respects the stripes placement with the Supreme print on back. Slight enzyme wash to loosen the hand of the print. \r\nStand up collar. Metal zip collar fastening. Topstitch seams on shoulders, with interior taping. Side splits on bottom sides. \r\n\r\nSTONE ISLAND FOR SUPREME \r\n901S5 COMPASS PIN DRYBAG® BY ORTLIEB\r\nDuffle bag in ultra-resistant waterproof PVC. The glossy and super resistant, heat sealed PVC Drybag® by Ortlieb carries the exclusive patented airtight waterproof zip for extreme protection. When air is captured inside the duffle bag it can act as a pillow.\r\nZip fastening. Big polyester strap handles. Supreme logo print on one side, Stone Island logo print on the other. Both ends are printed with the Stone Island/Supreme Compass Pin. Adjustable shoulder strap with padded piece carrying the Stone Island Compass logo. Pockets inside.\r\n\r\n903S6 STONE ISLAND HEAT REACTIVE\r\nTHERMOSENSITIVE FABRIC\r\nSupreme crusher in Stone Island Heat Reactive fabric, changing color depending on temperature. The molecules of the micro pigments encapsulated in the coating change the path of light, the garment gradually turns to a lighter color as the temperature rises and becomes darker again as it drops. \r\nStone Island patch logo on front. \r\n\r\n902S6 STONE ISLAND HEAT REACTIVE \r\nTHERMOSENSITIVE FABRIC\r\nSupreme six panels cap in Stone Island Heat Reactive fabric, changing color depending on temperature. The molecules of the micro pigments encapsulated in the coating change the path of light, the garment gradually turns to a lighter color as the temperature rises and becomes darker again as it drops.\r\nStone Island patch logo on front. Supreme embroidered logo on back. Adjustable closure.", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/69862dba-1df3-4f98-9dae-91783a4b2877.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/428df6c6-c60d-4f11-b00d-e90343118a13.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b539aa07-328a-40b6-a993-daa2e05d8ff5.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/87f32651-1a69-4e6e-bb18-769bfc0fdbb1.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/dabb2e39-5700-4440-8c99-fbeaece6ec09.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b445d653-4c81-48d5-98d3-3f4848d277d4.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/91326bed-8f98-4049-8883-bbda6226f95f.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4d74363f-3362-4948-bac0-c6c8e4eb32e6.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/ddb040f9-a8b4-4f91-87a0-02fc53bfbe4f.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/358b2608-eef7-4580-b016-9cac172c1e55.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/51085eff-b0c7-4e09-af58-d68bec8b3d91.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4907a7cd-0f1e-42ce-b7d0-9ad112ae478f.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/0b5f7a26-f879-4421-afe0-82996f6610f7.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/fc45fc87-a048-4fd3-8ff9-c58d5f5a7d15.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/7c6308b8-a99c-4b1b-8aad-c2d6dfc1a93f.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/681692a6-5b64-4f43-91ca-77ca7b45228e.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/5f5543bc-921a-4285-a4da-034910744976.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/097d40ba-f82c-4b0e-a614-de440e21345c.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/6787ab06-a7c5-4029-ac05-4e53d67a964b.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/378a4db2-e228-448d-83d6-e2735a89bdb9.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/61ec3ce3-b8bb-4544-b51f-779721bbb7b0.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/cd072dde-ec8e-4f23-b263-4fd83b04b9cf.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/a50b89e8-07e4-4da2-bf69-1b02f84feae7.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/04a57bfd-5e22-42df-a415-4dbec1d7c193.jpg", + "caption": "" + } + ], + "__index": "9", + "dateCreated": "Mon, 14 Mar 2016 13:57:55 GMT" + }, + { + "id": "70329-tank-shield-multi-layer-fusion-technology-", + "date": "Thu, 21 Apr 2016 12:00:00 GMT", + "title": "70329 TANK SHIELD - MULTI LAYER FUSION TECHNOLOGY ", + "subtitle": "", + "body": "Exclusive MULTI LAYER FUSION TECHNOLOGY. The garment, made in an opaque polyester tela, is preassembled and then entirely laminated with slightly overlapping panels producing a performing membrane to isolate hermetically the outer textile base and stitching. This technique guarantees improved waterproofness and breathability compared to common lamination techniques. \r\n\r\nCar coat using highly performing fabric and construction. Diagonal pockets with zip fastening. Adjustable straps at cuffs. Central vent on back. Zip and snap fastening.", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/77035181-a6e8-4817-a4f2-3dfee6afd509.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/f96d0cc2-a005-4c28-9dd4-467a204e6bc5.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/9b2305c6-20e6-4731-84e3-64fcf4d293ab.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/65ac1990-4390-4d84-bbbc-9afcdf61a1ad.png", + "caption": "" + } + ], + "__index": "10", + "dateCreated": "Thu, 21 Apr 2016 14:00:47 GMT" + }, + { + "id": "109ln-t-co-old", + "date": "Tue, 14 Jun 2016 12:00:00 GMT", + "title": "109LN T.CO+OLD", + "subtitle": "", + "body": "Hooded over shirt in stretch cotton broken twill. Garment dyed to create an OLD effect, an exclusive dyeing treatment and subsequent fading on the finished garment to create a slightly worn and three-dimensional appearance. Flat pockets at sides. Chest pockets with horizontal zip fastening. Ergonomic shaped sleeves. Hood edged with cotton tape. Zip fastening.", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/b4329a3b-0349-4473-af22-4b6f5151e337.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/7f762552-b961-4ab3-9ec3-97b5221bad3d.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/c003b009-79bc-491d-b3a7-3b79c8f4d0f0.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/fc12babb-8c79-423c-a1a5-68664e177952.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/5ba840fd-8159-496c-a1e4-772ce0c67510.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/73287608-5669-4404-8bf3-ddae63fd9131.png", + "caption": "" + } + ], + "__index": 10, + "dateCreated": "Tue, 14 Jun 2016 15:07:41 GMT" + }, + { + "id": "icon-imagery_fw-016-017", + "date": "Thu, 07 Jul 2016 12:00:00 GMT", + "title": "ICON IMAGERY_FW '016 '017", + "subtitle": "", + "body": "", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/4ad2bab9-2a63-4991-bf1e-2b1f616801fd.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/3c959c20-2534-477d-a77f-9eb59dfc5d93.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/e83dea7b-4672-4a02-bc85-def9929af6f0.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/0aa5e8d3-dc41-4c7f-a118-9007957674bb.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/681f033b-61aa-4ec0-8faf-2ac9e9874290.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/e68fdfa1-b543-42d1-84ca-db2f3b52d90d.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4abf9ef6-38ea-46fa-a0bc-9911b18fa106.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/e904dc23-a492-42ab-be30-0f3df2b3c957.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/0fb47449-d80f-4478-85c9-25d53d269967.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/cf1205ae-63cd-4eab-86e4-b9008322a16b.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/9e601e11-75c8-49f9-bdfe-eda859a27282.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4062566b-aaf5-48af-803e-0b9ad492cad4.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/6aaf42eb-68a8-4428-9bf5-2990adefa030.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/154300df-032b-4c1c-86c2-d63f48931415.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/1ed22a93-d2cd-43f8-a9c1-aafd376a4a16.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/06b2a209-14e9-422c-acf5-633992a4c9d4.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/98889f73-3320-4ee9-9ecd-30d36c6ad123.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/a2259e94-8c11-4afc-9b0f-0852b9fa5a7d.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4eecf0ec-1bc0-4f54-a0c0-21466f272ca9.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/0d6b242b-b9aa-483f-b99a-d1bfbb03bacb.png", + "caption": "" + } + ], + "__index": "11", + "dateCreated": "Thu, 07 Jul 2016 18:14:16 GMT" + }, + { + "id": "457j4-stone-island-house-check-jacquard-on-nylon-metal-black-watro-", + "date": "Tue, 12 Jul 2016 12:00:00 GMT", + "title": "457J4 STONE ISLAND HOUSE CHECK JACQUARD ON NYLON METAL BLACK WATRO ", + "subtitle": "App exclusive 7/12 - 7/18", + "body": "STONE ISLAND HOUSE CHECK JACQUARD ON NYLON METAL BLACK WATRO: Long anorak in Nylon Metal Black Watro with jacquard motive. The trilobate structure of the nylon yarn, with its grey weft and white ready to dye warp colors, is the grounds of the distinctive metallic and iridescent sheen of Nylon Metal. Jacquard technique creates a rip-stop design on the surface that is derived from the Stone Island House Check and integrates the star in the vertical and horizontal checked pattern. The fabric has been resin treated inside to achieve a mild water resistance. Garment dyed through double color recipe with the addition of a special anti-drop agent.\r\n\r\nDrawstring around the raised collar. Two large pockets on the front with hidden snap fastening. The pockets are contoured by zip; the garment can be folded away and packed into the zipped front pockets. Elastic tape at cuffs. Drawstring bottom hem.", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/7e1ec747-7322-43d4-b9c6-aec9104bf351.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/8b75a21c-d372-4acd-99ca-9556c7c3088c.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/db0fc358-7447-4623-a0bb-3f6cee5ce8b7.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/ae096f9c-3699-4e7f-b6a0-36ccf93ca5f9.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/d4fa8667-27aa-4c60-a363-6493620be435.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/70fa7875-bd70-4572-9612-f7d039238126.png", + "caption": "" + } + ], + "__index": "12", + "dateCreated": "Tue, 12 Jul 2016 15:15:33 GMT" + }, + { + "id": "stone-island-opens-new-york-store", + "date": "Thu, 14 Jul 2016 12:00:00 GMT", + "title": "STONE ISLAND OPENS NEW YORK STORE", + "subtitle": "", + "body": "Stone Island opens New York store, located at 41 Greene St. New York, NY 10013.\r\n\r\nThe unique location — a classic SoHo building from 1910 that last autumn hosted the exhibition “Reflective Research ‘992 – ‘015”— measures 3,500 SF and has undergone significant architectural renovation to create an archetypal Stone Island environment. Presenting both Stone Island and Stone Island Shadow Project collections, the flagship store in New York will carry special and exclusive products and installations in its dedicated Hub presentation space.\r\n\r\nStone Island New York\r\n41 Greene St, New York, NY 10013\r\nHours: Monday—Saturday, 11am-7pm, and Sunday, 11am-6pm.", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/b627cfa1-0782-42c3-9487-a57428893fda.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/2ac003a6-f035-49cb-bc27-2da6a3ce4ffb.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/c636b626-4fdb-4ac6-818a-35c26b520e0e.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/55a429b6-2f47-4c79-86f6-05db5d7fa7eb.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/d4636f88-d11f-4fca-af70-df941378bca0.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/aaf8f0a5-a420-427b-af4b-bad00b5709fd.jpg", + "caption": "" + } + ], + "__index": "14", + "dateCreated": "Thu, 14 Jul 2016 17:16:01 GMT" + }, + { + "id": "10112-nylon-metal", + "date": "Tue, 23 Aug 2016 12:00:00 GMT", + "title": "10112 NYLON METAL", + "subtitle": "", + "body": "NYLON METAL: Over shirt in Nylon Metal doubled inside in jersey. The trilobate structure of the nylon yarn, with its gray weft and white ready to dye warp colors, is the grounds of the distinctive metallic and iridescent sheen of Nylon Metal. The finished piece undergoes an elaborate double dye process providing the fibers and textile accessories of the garment with different tones, intensities and shades.\r\n\r\nFront yoke with inseam pocket alongside the closure with hidden zips. Snaps at cuffs. Zip fastening.", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/b2b4036c-5b9f-4537-9b16-9b823835d1c1.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/11eb738b-98a4-4ba3-a39a-63e19915c584.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/9a6f91ee-6950-4efd-9f2e-a75d47100169.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/a8dfb935-a952-419e-ac89-932ec755d5ae.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/75214c5d-5840-485f-b836-6cd8e9cb9ed2.png", + "caption": "" + } + ], + "__index": "15", + "dateCreated": "Tue, 23 Aug 2016 14:03:29 GMT" + }, + { + "id": "stone-island-chinatown-invitational", + "date": "Tue, 30 Aug 2016 12:00:00 GMT", + "title": "Stone Island Chinatown Invitational", + "subtitle": "", + "body": "Earlier this summer the Chinatown Soccer Club (CSC) hosted the 2016 Chinatown Invitational in Lower Manhattan. This year’s tournament featured four teams from around the world: CSC (New York), Ringleaders FC (Montreal), Soho Warriors FC (London), and Stone Island FC (Milan). The participating teams comprised an eclectic group of creatives united by a shared love of soccer.\r\n\r\nWriter, director, and CSC member, Alexander Klein, documented the invitational, capturing the diversity and camaraderie of the tournament, stating \"The short film was inspired by the pitches of downtown New York. It’s soccer infused with the sights, sounds, and energy of New York City — creating a sporting flavor unlike anything else in the world.\" Earlier this year he shot the soccer-documentary WE ARE SAN MARINO, narrated by Alex Karpovsky, for BitTorrent Now. \r\n\r\nThe short film will be presented by Stone Island from 6-9 tonight at the Nanogallery (100 Forsyth Street) and be on show through September 11. Alongside the film will be an installation of imagery, shot before and during the tournament by CSC members and photographers, Pep Kim and Dominic Neitz.", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/907548da-f870-420a-aff3-d4fec07cfd55.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/197f894b-e7dd-43b8-a603-12bff46f3c2f.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b89ea6bb-0128-4259-8bb6-28ca631dd61b.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/a1913c20-5c80-4303-bcdb-69dcdf261043.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/79dd20cd-08b8-490d-b678-f98210ba8692.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/df4affac-20c9-4186-9c28-1d6efcb6cd85.jpg", + "caption": "" + } + ], + "__index": "10", + "dateCreated": "Tue, 30 Aug 2016 16:02:48 GMT" + }, + { + "id": "polypropylene-denim", + "date": "Mon, 26 Sep 2016 12:00:00 GMT", + "title": "POLYPROPYLENE DENIM", + "subtitle": "APP EXCLUSIVE PREVIEW FROM 9/27 TO 10/3", + "body": "A new interpretation of a classic.\r\nPolypropylene, a material with antibacterial properties, is the lightest available fiber on earth.\r\nEven very bulky garments made in this material astonish for their specific lightness.\r\nThese denim cloth weaves a polypropylene yarn into an indigo dyed cotton warp. The result is an impeccable denim tela with a drastically reduced weight: it has the look of a 19 ounce material but weighs only 10.\r\nThe jumpsuit, the outerwear pieces, the trousers and backpack have undergone the DARK treatment, a manual sanding and light stonewash as well as an enzyme wash.\r\n \r\nPOLYPROPYLENE INDIGO KNIT is made by weaving yarns, an innovative technique from the knitwear industry. For this project a yarn was especially created from indigo dyed polypropylene and cotton yarn with chain construction.\r\n \r\nThe INDIGO FLEECE features WASH treatment.", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/ab51e2e6-19d6-4bfd-b8aa-7089bd49635b.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/091aa545-2605-4374-9437-e375d096d75c.jpg", + "caption": "" + } + ], + "__index": 10, + "dateCreated": "Tue, 27 Sep 2016 14:02:10 GMT" + }, + { + "id": "polypropylene-denim-video", + "date": "Tue, 27 Sep 2016 12:00:00 GMT", + "title": "POLYPROPYLENE DENIM VIDEO", + "subtitle": "APP EXCLUSIVE PREVIEW FROM 9/27 TO 10/3", + "body": "", + "link": "https://www.youtube.com/watch?v=twiCdserZ1M&feature=youtu.be", + "store": "true", + "__index": 11, + "dateCreated": "Tue, 27 Sep 2016 14:02:50 GMT", + "image": [ + { + "uri": "https://i.ytimg.com/vi/twiCdserZ1M/maxresdefault.jpg", + "width": "1920", + "height": "1080", + "caption": "" + } + ] + }, + { + "id": "garment-dyed-crinkle-reps-and-overalls-in-mussola-gommata", + "date": "Wed, 05 Oct 2016 12:00:00 GMT", + "title": "GARMENT DYED CRINKLE REPS AND OVERALLS IN MUSSOLA GOMMATA", + "subtitle": "APP EXCLUSIVE FROM 10/6 TO 10/12", + "body": "70223_Long down jacket in light nylon rep with an ultra-tight weaving construction. The resin coating of its inner face makes it wind resistant and mildly water resistant. \r\nThe dye bath gives the resin-treated fabric a slightly crinkled appearance on the surface.\r\n\r\nF0211_Overalls in Mussola Gommata, an exclusive fabric created by laminating an ultra light cotton muslin to an outer matte transparent polyurethane film. Rear and bottom front leg in Nylon Metal, with a metallic/iridescent appearance. The special double dye recipe provides the garment with unique shades. ", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/96660fe0-8b04-11e6-bd08-255bc61066e4.jpg", + "width": "827", + "height": "1240", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/96761570-8b04-11e6-bd08-255bc61066e4.jpg", + "width": "827", + "height": "1240", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/96800080-8b04-11e6-bd08-255bc61066e4.jpg", + "width": "827", + "height": "1240", + "caption": "" + } + ], + "__index": 12, + "dateCreated": "Wed, 05 Oct 2016 14:04:36 GMT" + }, + { + "id": "limited-edition-ice-jacket-resin-t-shell-down_fluo-pink-", + "date": "Tue, 11 Oct 2016 12:00:00 GMT", + "title": "LIMITED EDITION: ICE JACKET RESIN-T SHELL DOWN_FLUO PINK ", + "subtitle": "APP EXCLUSIVE FROM 10/13 TO 10/19", + "body": "70999_Parka/Down Jacket limited edition featuring a fluorescent pink internal down. \r\n\r\nThe jacket has a very light translucent nylon shell that changes color according to temperature variations thanks to a special thermo-chromatic resin coating.
\r\nInside the shell, a removable premium feather down jacket in fluorescent pink nylon creates further color play.
\r\n\r\nStone Island presents the new Ice Jacket, the evolution of the historical thermo-chromatic garment introduced in 1988.
\r\n\r\nThe Jacket will be on sale exclusively at Stone Island stores in New York and Los Angeles and on this App starting from 13 October.
", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/aab445e0-8fc1-11e6-bd08-255bc61066e4.jpg", + "width": "1334", + "height": "1000", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/a997d960-8fc1-11e6-bd08-255bc61066e4.jpg", + "width": "906", + "height": "1181", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/a97cfe60-8fc1-11e6-bd08-255bc61066e4.jpg", + "width": "906", + "height": "1181", + "caption": "" + } + ], + "__index": 17, + "dateCreated": "Tue, 11 Oct 2016 15:01:20 GMT" + }, + { + "id": "featherweight-leather-down", + "date": "Wed, 19 Oct 2016 12:00:00 GMT", + "title": "Featherweight Leather Down", + "subtitle": "APP EXCLUSIVE FROM 10/20 TO 10/26", + "body": "00196_Ultralight leather down jacket with inside insulation in nylon technical mesh filled with the finest down by direct injection. The insulation is heat sealed along the external leather seams with an artisan technique.
Completely heat sealed. ", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/f2c7b2d0-9607-11e6-bd08-255bc61066e4.jpg", + "width": "1000", + "height": "1335", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/f2730320-9607-11e6-bd08-255bc61066e4.jpg", + "width": "1000", + "height": "749", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/f2b5d880-9607-11e6-bd08-255bc61066e4.jpg", + "width": "1000", + "height": "749", + "caption": "" + } + ], + "__index": 18, + "dateCreated": "Wed, 19 Oct 2016 14:26:10 GMT" + }, + { + "id": "prototype-research-series_video", + "date": "Wed, 02 Nov 2016 12:00:00 GMT", + "title": "Prototype Research Series_Video", + "subtitle": "", + "body": "The STONE ISLAND _ Prototype Research Series are native limited editions. Numbered garments are made in fabrics and with treatments born from research and experimentation processes that have not yet been industrialized.\r\n\r\n
Series 01 presents LASERING ON LIQUID REFLECTIVE BASE, a piece made in a highly reflective fabric, entirely hand sprayed with a resin-based color.
A laser beam etches the surface, producing a graphic motif on the finished garment.
\r\n\r\nThe first drop of the project will be on sale exclusively on the Stone Island App starting Friday, 4 November.", + "link": "https://www.youtube.com/watch?v=PjhAdGglfa8", + "store": "false", + "__index": 19, + "dateCreated": "Wed, 02 Nov 2016 17:05:50 GMT", + "image": [] + }, + { + "id": "prototype-research_series-01-br-701r1_lasering-on-liquid-reflective-base", + "date": "Fri, 04 Nov 2016 12:00:00 GMT", + "title": "PROTOTYPE RESEARCH_SERIES 01 <br>701R1_LASERING ON LIQUID REFLECTIVE BASE", + "subtitle": "
LIMITED EDITION - NUMBERED 01 TO 100", + "body": "Anorak in an exclusive custom made highly reflective fabric, thanks to a resin coating embedding thousands of glass microspheres, individually hand sprayed with a resin-based color and then oven dried.
A numerical control laser beam etches the surface, producing a three dimensional tone-on-tone effect on the finished garment.\r\n\r\nThe backside features the lasered Stone Island logo.
The high level of artisanship involved in the process makes each garment unique and unrepeatable.
\r\n\r\nExclusively available on Stone Island App
", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/87b07d60-a29b-11e6-bd08-255bc61066e4.jpg", + "width": "1211", + "height": "1477", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/8832ccc0-a29b-11e6-bd08-255bc61066e4.jpg", + "width": "1211", + "height": "1477", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/88604560-a29b-11e6-bd08-255bc61066e4.jpg", + "width": "1211", + "height": "1477", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/88db8fe0-a29b-11e6-bd08-255bc61066e4.jpg", + "width": "1211", + "height": "1477", + "caption": "" + } + ], + "__index": 20, + "dateCreated": "Fri, 04 Nov 2016 15:27:17 GMT" + }, + { + "id": "nikelab-x-stone-island_preview", + "date": "Wed, 09 Nov 2016 12:00:00 GMT", + "title": "NIKELAB X STONE ISLAND_PREVIEW", + "subtitle": "", + "body": "The third collaboration between NikeLab and Stone Island, concluding the year of the Windrunner.\r\n\r\nThe Nike Windrunner, remastered with parka length, volumes and functions, is made in JACQUARD GRID ON WOOL FUR, exclusively engineered by Stone Island for this co-lab.\r\n\r\nThe garment is composed of an outer face in a jacquard engineered tonic nylon rip stop grid that is bonded to a water and wind resistant membrane and to an inner 100% wool fur on cotton layer.\r\nNike’s distinctive Windrunner chevron is made in nylon tape. Through a complex garment dyeing recipe, the jacquard grid and the inner woolen fur both capture high definition contrasts and subtle tonal shades, while respecting the performance features of the membrane.\r\n\r\nNikeLab x Stone Island will be on sale from Thursday, November 17 in Stone Island flagship stores, on the Stone Island app, in NikeLab stores and on nike.com/nikelab.", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/64ea2d80-a697-11e6-bd08-255bc61066e4.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/64f2e010-a697-11e6-bd08-255bc61066e4.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/64ed3ac0-a697-11e6-bd08-255bc61066e4.jpg", + "width": "776", + "height": "1012", + "caption": "" + } + ], + "__index": 21, + "dateCreated": "Wed, 09 Nov 2016 16:13:18 GMT" + }, + { + "id": "spring-summer_-017-lookbook", + "date": "Tue, 13 Dec 2016 12:00:00 GMT", + "title": "SPRING SUMMER_'017 LOOKBOOK", + "subtitle": "", + "body": "SS'017 Crinkle Reps Bomber special preview exclusive available from December 15th on the Stone Island App.", + "link": "", + "store": "false", + "__index": 22, + "dateCreated": "Tue, 13 Dec 2016 14:58:50 GMT", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/21ba23d0-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/200ee4d0-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/1e2f2850-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/1c8066e0-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/197bb260-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/17803080-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/15b7f3a0-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/13b4f7b0-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/0579ee80-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/036dcad0-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/01a9aca0-c145-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/ff9ec170-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/fda98120-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/fb383300-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/f918fc80-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/f73bb100-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/f4906720-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/f27a7f70-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/f0134370-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/e950eab0-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/e35404d0-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/debfd6b0-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/daa98b20-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d7f95f40-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d4cde8e0-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d1b97cf0-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/ceb2cca0-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/c87b4ec0-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/c3b206e0-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/bf0101f0-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/bac04b00-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/b823a720-c144-11e6-bd08-255bc61066e4.jpg", + "width": "800", + "height": "1200", + "caption": "" + } + ] + }, + { + "id": "stone-island_spring-summer_-017_video-teaser", + "date": "Wed, 11 Jan 2017 12:00:00 GMT", + "title": "Stone Island_Spring Summer_'017_Video teaser", + "subtitle": "", + "body": "", + "link": "https://youtu.be/iia_oPZPY_Y", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/93699100-d8dd-11e6-abc7-59ceb822d9d2.jpg", + "width": "1920", + "height": "1080", + "caption": "" + } + ], + "__index": 23, + "dateCreated": "Thu, 12 Jan 2017 15:42:24 GMT" + }, + { + "id": "stone-island_spring-summer_-017_icon-imagery", + "date": "Thu, 12 Jan 2017 12:00:00 GMT", + "title": "Stone Island_Spring Summer_'017_Icon Imagery", + "subtitle": "", + "body": "", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d5f07520-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d4b13e60-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d57c7da0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d6bb1820-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d432bf90-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d4f54c40-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d33043b0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d58222f0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d28f21b0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d1f1a930-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d3219db0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d32658a0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d0611e20-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d131b490-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d07bf920-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d1d2fda0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d21006a0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/d01d5e60-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/cec19ef0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/cd455f30-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/ce493aa0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/ce8224f0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/ce774f80-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/cd49a4f0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/cd0e49a0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/cbc771c0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/cac06200-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/c9ca6940-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/cbbe22f0-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/cbba5260-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/ca202a60-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/ca130b00-d8d8-11e6-abc7-59ceb822d9d2.jpg", + "width": "776", + "height": "1012", + "caption": "" + } + ], + "__index": 24, + "dateCreated": "Thu, 12 Jan 2017 15:46:04 GMT" + }, + { + "id": "nikelab-x-stone-island-sock-dart-mid_preview-stone-island-research-meets-nike-design", + "date": "Thu, 19 Jan 2017 12:00:00 GMT", + "title": "NIKELAB X STONE ISLAND SOCK DART MID_PREVIEW
STONE ISLAND RESEARCH MEETS NIKE DESIGN", + "subtitle": "", + "body": "With this collaboration Stone Island has been challenged to apply its research skills on Nike fabrics in an interpretation of the Nike Sock Dart Mid Slip On Shoe.
Applying the personal approach to investigation and the development of new technologies, Stone Island has tested several techniques in able to combine a graphic look and feel with functionality, in order to find the right meeting point between its know-how and Nike’s design.
The outcome is a glossy and elastic engineered zonal silicone print, adding structure and protection to the hyper-stretch breathable sandwich mesh used for the upper, still maintains the flexibility attributes that are signature to the Sock Dart.
The new mid-cut silhouette has an extended collar with a leather grain deboss pattern and poly spandex lining.
Glossy molded midfoot adjustable strap.
New Duralon foam outsole: the forefoot features a multidirectional sipe pattern for water dispersion and improved traction.
NikeLab x Stone Island Sock Dart Mid will be released in three colorways: black, obsidian bleu and - exclusively at flagship stores - in sequoia green.
It will be on sale from Thursday, January 26 in Stone Island flagship stores, on the Stone Island app, in NikeLab stores and on nike.com/nikelab.", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/a6e5c860-de47-11e6-abc7-59ceb822d9d2.jpg", + "width": "1000", + "height": "563", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/89838140-de47-11e6-abc7-59ceb822d9d2.jpg", + "width": "770", + "height": "488", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/89aa4320-de47-11e6-abc7-59ceb822d9d2.jpg", + "width": "770", + "height": "488", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/89a7ab10-de47-11e6-abc7-59ceb822d9d2.jpg", + "width": "770", + "height": "488", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/89378420-de47-11e6-abc7-59ceb822d9d2.jpg", + "width": "770", + "height": "488", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/89548200-de47-11e6-abc7-59ceb822d9d2.jpg", + "width": "770", + "height": "488", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/890c5570-de47-11e6-abc7-59ceb822d9d2.jpg", + "width": "770", + "height": "488", + "caption": "" + } + ], + "__index": 25, + "dateCreated": "Thu, 19 Jan 2017 13:44:32 GMT" + }, + { + "id": "hand-corrosion_stone-island-app-exclusive-colorways", + "date": "Sun, 22 Jan 2017 12:00:00 GMT", + "title": "Hand Corrosion_Stone Island App Exclusive Colorways", + "subtitle": "", + "body": "An artisan process with corrosive paste
that makes each garment unique and unrepeatable.
\r\n\r\nHAND CORROSION\r\nGarments are dyed with special recipes and then decolored by hand with a corrosive paste.
The Stone Island badge is attached to the pieces during the manual fading and features the same corrosion marks.
Residual dye highlights the architecture of the garments.
This artisan process makes each piece unique and unrepeatable.\r\n\r\nSTONE ISLAND APP EXCLUSIVE COLORWAYS \r\n\r\n45131_Yellow Field Jacket made in military-derived cotton satin, garment dyed with special corrodible colorants and then manually faded, steamed and intensely washed with the addition of an anti-drop agent.\r\n\r\n
541A1_Black cotton crew neck. Worked in brioche stitch knit. Garment dyed with special corrodible colorants and then faded by hand with a corrosive paste, steamed and intensely washed. ", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/020846f0-e17c-11e6-abc7-59ceb822d9d2.jpg", + "width": "580", + "height": "813", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/023d60b0-e17c-11e6-abc7-59ceb822d9d2.jpg", + "width": "580", + "height": "813", + "caption": "" + } + ], + "__index": 26, + "dateCreated": "Mon, 23 Jan 2017 14:57:23 GMT" + }, + { + "id": "hand-corrosion-video", + "date": "Mon, 23 Jan 2017 12:00:00 GMT", + "title": "Hand Corrosion Video", + "subtitle": "", + "body": "An artisan process with corrosive paste\r\nthat makes each garment unique and unrepeatable.", + "link": "https://youtu.be/1u6OovE0cY4", + "store": "true", + "__index": 27, + "dateCreated": "Mon, 23 Jan 2017 15:21:19 GMT", + "image": [] + }, + { + "id": "nylon-metal-color-weft_app-exclusive-colorway", + "date": "Tue, 14 Feb 2017 12:00:00 GMT", + "title": "Nylon Metal Color Weft_App Exclusive Colorway", + "subtitle": "", + "body": "The evolution of one of the most iconic Stone Island fabrics\r\nUnprecedented iridescent colors \r\n\r\nNYLON METAL COLOR WEFT\r\n\r\n10245_Over shirt in Nylon Metal with colored weaved yarns.
Two pockets with flap and button fastening on chest.
Hidden zip fastening.
\r\n\r\nThe metallic and iridescent aspect of Nylon Metal, one of the most versatile fabrics issued from the STONE ISLAND textile research, is enhanced with colored tones thanks to the tint of its weft yarns. Garments made in this fabric undergo an elaborate double recipe dye process enhancing its chromatic iridescences.
\r\n\r\nAPP EXCLUSIVE FROM 2/16 TO 2/20", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/undefined/579783e0-f2c7-11e6-abc7-59ceb822d9d2.jpg", + "width": "466", + "height": "692", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/57936530-f2c7-11e6-abc7-59ceb822d9d2.jpg", + "width": "466", + "height": "692", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/57861ec0-f2c7-11e6-abc7-59ceb822d9d2.jpg", + "width": "466", + "height": "692", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/57a16ef0-f2c7-11e6-abc7-59ceb822d9d2.jpg", + "width": "466", + "height": "692", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/57a2a770-f2c7-11e6-abc7-59ceb822d9d2.jpg", + "width": "466", + "height": "692", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/578e0e00-f2c7-11e6-abc7-59ceb822d9d2.jpg", + "width": "466", + "height": "692", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/57ef67e0-f2c7-11e6-abc7-59ceb822d9d2.jpg", + "width": "466", + "height": "692", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/undefined/58036510-f2c7-11e6-abc7-59ceb822d9d2.jpg", + "width": "466", + "height": "692", + "caption": "" + } + ], + "__index": 28, + "dateCreated": "Tue, 14 Feb 2017 15:08:43 GMT" + }, + { + "id": "garment-dyed-plated-reflective", + "date": "Thu, 02 Mar 2017 12:00:00 GMT", + "title": "GARMENT DYED PLATED REFLECTIVE", + "subtitle": "", + "body": "The new Reflective Jacket is made with an innovative fabric engineered to be garment-dyed.\r\nIts nylon tela base is plated with a highly reflective resin coating, while the details in Mussola Gommata and fabric mixes highlight the garment-dye technique.\r\n\r\nSTONE ISLAND APP EXCLUSIVE COLORWAYS PINK QUARTZ AND AVIO BLUE\r\n\r\n453S6_Hooded jacket constructed with parts in Mussola Gommata. \r\nThe finished piece is garment dyed with specific double dye recipes lending color to the textile base while respecting the reflective surface.", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://marsupial.s3.amazonaws.com/stoneisland/b9fe8eb0-ff6b-11e6-8ca3-81835dc6c47b.jpg", + "width": "580", + "height": "813", + "caption": "" + }, + { + "uri": "https://marsupial.s3.amazonaws.com/stoneisland/ba1a7b20-ff6b-11e6-8ca3-81835dc6c47b.jpg", + "width": "580", + "height": "813", + "caption": "" + } + ], + "__index": 29, + "dateCreated": "Thu, 02 Mar 2017 17:17:11 GMT" + }, + { + "id": "stone-island-marina_tank-shield-featuring-multi-layer-fusion-technology-", + "date": "Thu, 09 Mar 2017 12:00:00 GMT", + "title": "STONE ISLAND MARINA_TANK SHIELD
FEATURING MULTI LAYER FUSION TECHNOLOGY ", + "subtitle": "", + "body": "703X1_Trench Coat characterized by highly performing
fabric and construction. Fold-away hood into stand up collar.
\r\n\r\nGarments pre-assembled and then laminated to membrane-bonded panels, hermetically sealing the external base fabric and all seams.\r\n
The exclusive Multi Layer Fusion Technology guarantees maximum waterproofness and breathability.
\r\nStripes on sleeves and logo on back are created with laser technology, revealing the inside membrane.\r\n\r\n
APP EXCLUSIVE FROM 3/10 TO 3/16", + "link": "", + "store": "false", + "image": [ + { + "uri": "https://marsupial.s3.amazonaws.com/stoneisland/782e15f0-04d9-11e7-9f22-910070d5f727.jpg", + "width": "1304", + "height": "1229", + "caption": "" + }, + { + "uri": "https://marsupial.s3.amazonaws.com/stoneisland/781adc10-04d9-11e7-9f22-910070d5f727.jpg", + "width": "1571", + "height": "2000", + "caption": "" + }, + { + "uri": "https://marsupial.s3.amazonaws.com/stoneisland/779ea730-04d9-11e7-9f22-910070d5f727.jpg", + "width": "1571", + "height": "2000", + "caption": "" + } + ], + "__index": 30, + "dateCreated": "Thu, 09 Mar 2017 15:03:13 GMT" + }, + { + "id": "stone-island-marina_corrosion-print_app-exclusive-preview", + "date": "Thu, 23 Mar 2017 12:00:00 GMT", + "title": "Stone Island Marina_Corrosion Print_App Exclusive Preview", + "subtitle": "", + "body": "T-shirt and bermuda shorts made in black printed cotton with placed reserve Stone Island Marina motif.
A further striped motif is printed through the corrosion of the base fabric color.
\r\n\r\nBackpack in ultra-resistant waterproof PVC with waterproof zip fastening.
Thermal printed Stone Island Marina graphic and stripes.\r\n\r\n
APP EXCLUSIVE FROM 3/24 TO 3/29", + "link": "", + "store": "true", + "image": [ + { + "uri": "https://marsupial.s3.amazonaws.com/stoneisland/974bb740-0fd2-11e7-85aa-87522fc1a5c5.jpg", + "width": "580", + "height": "813", + "caption": "" + }, + { + "uri": "https://marsupial.s3.amazonaws.com/stoneisland/969bef40-0fd2-11e7-85aa-87522fc1a5c5.jpg", + "width": "580", + "height": "813", + "caption": "" + } + ], + "__index": 31, + "dateCreated": "Thu, 23 Mar 2017 14:22:34 GMT" + } + ], + "page": [ + { + "id": "terms-and-conditions", + "title": "Terms and Conditions", + "image": { + "uri": "", + "caption": "" + }, + "body": "<center><b>TERMS AND CONDITIONS OF USE</center></b>\r\nWelcome to www.stoneisland.com. These terms and conditions (the “General Terms and Conditions of Use”) govern your use of, access to, and purchase of products from the United States section of www.stoneisland.com (the \"US Site\"). By using the US Site, you agree to comply with and be bound by these General Terms and Conditions of Use. If you do not agree to these General Terms and Conditions of Use, please do not use the US Site.\r\n\r\n<b>1. GENERAL</b>\r\nwww.stoneisland.com is the property of SPORTSWEAR COMPANY, a company having an address at Galleria Cavour 4, 40124 Bologna, Italy (\"STONE ISLAND and STONE ISLAND DENIMS\") and is operated under license by YOOX Corporation, a Delaware corporation having an address at 148 Lafayette Street, 10th Floor, New York, NY, 10013, United States of America (the \"Provider\"). \r\n\r\n<b>2. OTHER SITE POLICIES</b>\r\nPlease review our <a href=“http://www.stoneisland.com/localize.asp?tskay=4036416C&page=legal/saleterms&”>General Terms and Conditions of Sale</a>, <a href=“http://www.stoneisland.com/localize.asp?tskay=4036416C&page=legal/returnpolicy& “>Return Policy</a> and <a href=“http://www.stoneisland.com/localize.asp?tskay=4036416C&page=legal/privacypolicy&”>Privacy Policy</a> (collectively, the “Site Policies\"). All Site Policies are incorporated in these General Terms and Conditions of Use by this reference and, therefore, apply to your access to, use of and purchase of products from the US Site. If you do not agree to our Site Policies, please do not use the US Site. We reserve the right to make changes to the US Site, the Site Policies, and these General Terms and Conditions of Use at any time. If any of these conditions shall be deemed invalid, void, or for any reason unenforceable, that condition shall be deemed severable and shall not affect the validity and enforceability of any remaining condition. \r\n\r\n<b>3. PURCHASE FOR PERSONAL USE ONLY</b>\r\nYou may purchase products on the US Site only for personal use and not for resale. By placing your order, you certify that you are purchasing products for personal use only and not for resale and you accept our <a href=“http://www.stoneisland.com/localize.asp?tskay=4036416C&page=legal/saleterms&”>General Terms and Conditions of Sale</a>. WE RESERVE THE RIGHT TO REFUSE ORDERS FOR ANY REASON WITHOUT EXPLANATION. \r\n\r\n<b>4. USER'S SUBMISSIONS</b>\r\nWe welcome your comments and feedback regarding the US Site, our products and our services. We do not, however, accept confidential or proprietary information. Accordingly, all comments, feedback, reviews, ideas, suggestions, materials, images, information and other submissions (collectively, the “Submissions”) disclosed, submitted or offered to the Provider via the US Site, or otherwise, are not confidential. You represent and warrant that any Submissions that you submit to the Provider are made in compliance with applicable laws, do not violate any right of any third party, including privacy and intellectual property rights. By disclosing, submitting or offering any Submissions to the Provider, you grant the Provider and STONE ISLAND and STONE ISLAND DENIMS a nonexclusive, royalty-free, perpetual, irrevocable, and fully sublicensable right to use, reproduce, modify, adapt, publish, translate, create derivative work from, distribute, display such Material throughout the world in any media. You are and shall remain solely responsible for any Submissions you disclose, submit or offer to the Provider or STONE ISLAND and STONE ISLAND DENIMS. \r\n\r\n<b>5. PRIVACY</b>\r\nWe recommend that you read our <a href=“http://www.stoneisland.com/localize.asp?tskay=4036416C&page=legal/privacypolicy&”>Privacy Policy</a>, which explains our online privacy practices. \r\n\r\n<b>6. COPYRIGHT</b>\r\nAll content included on www.stoneisland.com US Site, such as works, images, pictures, dialogues, music, sounds, videos, documents, drawings, figures, logos, menus, web pages, graphics, colors, schemes, tools, fonts, designs, diagrams, layouts, methods, processes, functions and software (collectively, the \"Content\"), is the property of STONE ISLAND and STONE ISLAND DENIMS or its content suppliers and is protected by national and international copyright and other intellectual property laws. You may not reproduce, publish, distribute, display, modify, create derivative work from, or exploit in any way, in whole or in part, the Content without the prior express written consent of STONE ISLAND and STONE ISLAND DENIMS, or its content suppliers, as the case may be. STONE ISLAND and STONE ISLAND DENIMS and its content suppliers shall have the exclusive right to authorize or prohibit in their sole discretion any reproduction, publication, distribution, display, modification, creation of derivative work from, or exploitation in any way of, in whole or in part, the Content. STONE ISLAND and STONE ISLAND DENIMS and its content suppliers shall have the right, at any time, to claim the authorship of any Content posted on the US Site and to object to any use, distortion or other modification of such Content. Any reproduction, publication, distribution, display, modification, creation of derivative work from, or exploitation in any way of, the Content expressly authorized in writing by STONE ISLAND and STONE ISLAND DENIMS or its content suppliers shall be carried out by you for lawful purposes only and in compliance with all applicable laws. \r\n\r\n<b>7. LICENSE AND SITE ACCESS</b>\r\nThe viewing, printing or downloading of any Content from the US Site grants you only a limited, nonexclusive and nontransferable license for use solely by you for your own personal use and not for republication, distribution, assignment, sublicense, sale, preparation of derivative works or other use. No part of any Content may be reproduced in any form or incorporated into any information system, electronic or mechanical, other than for your personal use (but not for resale or redistribution). Any unauthorized use of the US Site and the Content immediately terminates the license granted by the Provider. \r\nYou will be solely responsible for all damages and other harm resulting from your use of the US Site and the Content. STONE ISLAND and STONE ISLAND DENIMS and the Provider shall not be deemed liable for any use of the US Site and the Content made by you in violation of any applicable laws and regulations and these General Terms and Conditions of Use. \r\n\r\n<b>8. COPYRIGHT COMPLAINTS</b>\r\nWe respect the intellectual property of others. If you believe that your work has been copied in a way that constitutes copyright infringement, please contact a STONE ISLAND and STONE ISLAND DENIMS copyright representative for further information at <a href=“mailto:privacy@mail.stoneisland.com”>privacy@mail.stoneisland.com</a>. \r\n\r\n<b>9. LINKS TO OTHER WEB SITES</b>\r\nThe US Site may provide hyperlinks to third party websites (“Third Party Websites\"). The Provider and STONE ISLAND and STONE ISLAND DENIMS do not operate, control, endorse or guarantee any Third Party Websites. You agree that the Provider and STONE ISLAND and STONE ISLAND DENIMS are not responsible for any content, services and/or products provided by any Third Party Website, nor are the Provider and STONE ISLAND and STONE ISLAND DENIMS responsible for any practice followed by such Third Party Website with respect to the collection and processing of personal data of their users. When you access any Third Party Website through a hyperlink posted on the US Site, please carefully read the terms and conditions of use, privacy policy and other policies of such Third Party Website. Our policies do not apply to any Third Party Website. \r\nYou The Provider provides hyperlinks to Third Party Websites only for the convenience of its users. By providing hyperlinks to Third Party Websites, the Provider does not recommend that its users access such Third Party Websites. \r\n\r\nYOU AGREE THAT YOUR USE OF ANY THIRD PARTY WEBSITE IS AT YOUR SOLE RISK AND WITHOUT WARRANTIES OF ANY KIND BY THE PROVIDER, EXPRESSED, IMPLIED OR OTHERWISE, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NONINFRINGEMENT. UNDER NO CIRCUMSTANCES ARE THE PROVIDER AND/OR STONE ISLAND and STONE ISLAND DENIMS LIABLE FOR DAMAGES ARISING FROM ANY TRANSACTION BETWEEN YOU AND ANY THIRD PARTY WEBSITE OR FOR ANY INFORMATION APPEARING ON THIRD PARTY WEBSITES. \r\n\r\n<b>10. GOVERNING LAW AND CHOICE OF FORUM</b>\r\nThe laws of the State of New York (without giving effect to its conflicts of law principles) govern all matters arising out of or relating to these General Terms and Conditions of Sale, including, without limitation, their validity, interpretation, construction, performance, and enforcement. All legal proceedings arising out of or in connection with these General Terms and Conditions of Sale shall be brought solely in the City of New York, State of New York. \r\n\r\n<b>11. DISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITY</b>\r\nTHE US SITE AND ALL INFORMATION, CONTENT, MATERIALS, PRODUCTS (INCLUDING SOFTWARE) AND SERVICES INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THIS SITE ARE PROVIDED BY THE PROVIDER ON AN \"AS IS\" AND \"AS AVAILABLE\" BASIS, UNLESS OTHERWISE SPECIFIED IN WRITING. THE PROVIDER MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE OPERATION OF THIS SITE OR THE INFORMATION, CONTENT, MATERIALS, PRODUCTS (INCLUDING SOFTWARE) OR SERVICES INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THIS SITE, UNLESS OTHERWISE SPECIFIED IN WRITING. YOU EXPRESSLY AGREE THAT YOUR USE OF THIS SITE IS AT YOUR SOLE RISK. \r\n\r\nTO THE FULL EXTENT PERMISSIBLE BY APPLICABLE LAW, THE PROVIDER DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE PROVIDER DOES NOT WARRANT THAT THIS SITE; INFORMATION, CONTENT, MATERIALS, PRODUCTS (INCLUDING SOFTWARE) OR SERVICES INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THIS SITE; THEIR SERVERS; OR E-MAIL SENT FROM THE PROVIDER ARE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. THE PROVIDER WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF THIS SITE OR FROM ANY INFORMATION, CONTENT, MATERIALS, PRODUCTS (INCLUDING SOFTWARE) OR SERVICES INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THIS SITE, INCLUDING, BUT NOT LIMITED TO DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, AND CONSEQUENTIAL DAMAGES, UNLESS OTHERWISE SPECIFIED IN WRITING. \r\n\r\nCERTAIN STATE LAWS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES OR THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES. IF THESE LAWS APPLY TO YOU, SOME OR ALL OF THE ABOVE DISCLAIMERS, EXCLUSIONS, OR LIMITATIONS MAY NOT APPLY TO YOU, AND YOU MIGHT HAVE ADDITIONAL RIGHTS.\r\n\r\n<center><b>TERMS AND CONDITIONS OF SALE</center></b>\r\nThe following General Terms and Conditions of Sale govern the sale of merchandise by YOOX Corporation, an affiliate of YOOX NET-A-PORTER GROUP S.p.A. (the \"Provider\" or \"we\") to you through the US section of www.stoneisland.com (\"US Site\"). The US Site is available only for purchases made and delivered within the United States. Your use of the US Site to purchase merchandise indicates your agreement to follow and to be bound by these General Terms and Conditions of Sale.\r\n\r\n<b>1. ORDERS & PRODUCTS</b>\r\nAll orders are subject to e-mail confirmation by us. Please note that the products displayed on the US Site may be out-of-stock or discontinued, and availability is not guaranteed. Please note that while we have tried to accurately display the colors of products, the actual colors you see will depend on your monitor and may not be accurate. \r\n\r\n<b>2. PRICES</b>\r\nAll prices are in US Dollars. Prices may change without notice from time to time. The total amount due is inclusive of sales tax applied in accordance with applicable state and local regulations based on your shipping address. The applicable sales tax amount is indicated on the payment page of the cart.\r\n\r\nThe amount of sales tax charged on your order will depend upon various factors, including type of item purchased, sales price and destination of the shipment. Sales tax regulations may change between the time you place an order and the time of credit card charge authorization and this may affect the calculation of sales taxes. The amount appearing on your payment page of the cart may differ from the sales taxes ultimately charged as indicated in the invoice you will receive with the shipping confirmation e-mail.\r\n\r\nAll prices are inclusive of customs and import duties.\r\n\r\n<b>3. SHIPPING COSTS</b>\r\nYou are responsible for the shipping costs associated with the delivery of the products you purchase on the US Site as specified on your order confirmation. \r\n\r\n<b>4. SHIPMENTS AND DELIVERY</b>\r\nYou bear all risks of loss and damage to the products from the time the same have cleared our fulfillment house. Delivery is deemed complete and title to the products passes to you upon acceptance of shipment by a common carrier.\r\n\r\n<b>5. RETURNS AND REFUNDS</b>\r\nPlease refer to our <a href=“http://www.stoneisland.com/localize.asp?tskay=4036416C&page=legal/returnpolicy&“>Return and Refund Policy</a>, which forms an integral part of these General Terms and Conditions of Sale. \r\n\r\n<b>6. BINDING AGREEMENT</b>\r\nOur order confirmation, these General Terms and Conditions of Sale and our other Site Policies shall be deemed the final and integrated agreement between you and us on the matters contained in these General Terms and Conditions of Sale. \r\n\r\n<b>7. GOVERNING LAW AND CHOICE OF FORUM</b>\r\nThe laws of the State of New York (without giving effect to its conflicts of law principles) govern all matters arising out of or relating to these General Terms and Conditions of Sale, including, without limitation, their validity, interpretation, construction, performance, and enforcement. All legal proceedings arising out of or in connection with these General Terms and Conditions of Sale shall be brought solely in the City of New York, State of New York. \r\n\r\n<b>8. DISCLAIMERS AND LIMITATIONS OF LIABILITY</b>\r\nTHE PROVIDER MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE PRODUCTS INCLUDED IN THE www.stoneisland.com US SITE NOR AS TO THE MERCHANDISE BEING SOLD TO YOU. TO THE FULLEST EXTENT PERMISSIBLE BY APPLICABLE LAW, THE PROVIDER DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT, AND THERE ARE NO WARRANTIES, EXPRESS OR IMPLIED, WHICH EXTEND BEYOND THE DESCRIPTION OF THE MERCHANDISE CONTAINED ON OUR ORDER CONFIRMATION. THE PROVIDER WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF THE US SITE, INCLUDING BUT NOT LIMITED TO DIRECT, INDIRECT, INCIDENTAL, PUNITIVE AND CONSEQUENTIAL DAMAGES \r\nCERTAIN STATE LAWS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES OR THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES. IF THESE LAWS APPLY TO YOU, SOME OR ALL OF THE ABOVE DISCLAIMERS, EXCLUSIONS, OR LIMITATIONS MAY NOT APPLY TO YOU, AND YOU MIGHT HAVE ADDITIONAL RIGHTS.\r\n\r\n<b>9. SEVERABILITY</b>\r\nIf any provision of these General Terms and Conditions of Sale is determined to be invalid, illegal or unenforceable, the remaining provisions of these General Terms and Conditions of Sale remain in full force to the extent permitted by law.\r\n\r\n<b>10. PRIVACY</b>\r\nThe terms and conditions of the our <a href=“http://www.stoneisland.com/localize.asp?tskay=4036416C&page=legal/privacypolicy&”>Privacy Policy</a> govern the processing of all personal data collected from you in connection with your purchase of products through the US Site.\r\n\r\n<b>11. FORCE MAJEURE</b>\r\nProvider shall not be liable for any delay or failure in performance caused by circumstances beyond its reasonable control.\r\n\r\n<b>12. ERRORS AND INACCURACIES</b>\r\nOur goal is to provide complete, accurate, and up-to-date information on our website. Unfortunately, it is not possible to ensure that any website is completely free of human or technological errors. This website may contain typographical mistakes, inaccuracies, or omissions, some of which may relate to pricing and availability, and product information. We reserve the right to correct any errors, inaccuracies or omissions, including after an order has been submitted, and to change or update information at any time without prior notice.\r\n", + "__index": "1", + "dateCreated": "Tue, 17 Nov 2015 20:31:52 GMT", + "tag": "terms" + }, + { + "id": "privacy-policy", + "title": "Privacy Policy", + "image": { + "uri": "", + "caption": "" + }, + "body": "Welcome to www.stoneisland.com. Please read our Privacy Policy carefully. This Privacy Policy applies when you visit and surf the United States section of www.stoneisland.com (the \"www.stoneisland.com US Site\") regardless of whether you purchase products or not, when you register with the www.stoneisland.com US Site, and when you use our services. By using the www.stoneisland.com US Site, you accept the practices described in this Privacy Policy. If you do not want to accept the practices described in this Privacy Policy, please do not use the www.stoneisland.com US Site. \r\nThe www.stoneisland.com US Site is operated under license by , a Delaware corporation having an address at 148 Lafayette Street, 10th Floor, New York, NY, 10013, United States of America (\"YOOX USA\"). YOOX USA is a subsidiary of YOOX NET-A-PORTER GROUP S.p.A., an Italian company having its registered address at via Morimondo, 17 – Milano 20143 (\"YOOX\") and controls the personal data of users and customers of the www.stoneisland.com US Site together with SPORTSWEAR COMPANY, having address at Galleria Cavour 4, 40124 Bologna, Italy, Italy, VAT, 01046470371 (jointly referred to as \"YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY\"). \r\nSince personal data of users and customers of the www.stoneisland.com US Site may be processed in Italy, any such processing of personal data will be conducted in compliance with applicable US law as well as the Italian Data Protection Code (Legislative Decree no. 196 dated June 30, 2003). Pursuant to the Italian Data Protection Code, YOOX USA is the controller of personal data of users and customers of the www.stoneisland.com US Site. As controller of personal data, YOOX USA independently determines the purposes and means by which your personal data are processed, including all security measures. As required by the Italian Data Protection Code, YOOX USA has appointed YOOX NET-A-PORTER GROUP as its data protection representative in Italy. As our data protection representative in Italy, YOOX, together with SPORTSWEAR COMPANY, independently ensures that personal data are processed in Italy in a correct and lawful manner and in accordance with good practice.\r\n\r\n<b>1. OUR POLICY</b>\r\nEveryone has the right to the protection of his/her personal data. YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY respect our users' right to be informed about the collection and processing of their personal data. The www.stoneisland.com US Site has been designed in such a way that the use of your personal data will be minimal and will not exceed the original purpose for which your personal data are collected and/or processed. In particular, we do not disclose your identity when the purpose for which your personal data are being processed can be achieved by using anonymous aggregate information. This Privacy Policy is intended to provide you with all the information you need in order to understand our privacy practices.\r\nHowever, if you have any questions regarding our privacy practices and this Privacy Policy, please contact us at the following e-mail address:<a target=\"_blank\" href=“mailto:privacy@mail.stoneisland.com”>privacy@mail.stoneisland.com</a>.\r\nThe www.stoneisland.com US Site is not directed at, nor do we knowingly collect personally identifiable information from children under the age of 13, although we may sell children's products or services for purchase by adults. If you are under 18, you may use the www.stoneisland.com US Site only with the involvement of a parent or guardian. \r\n\r\n<b>2. WHO PROCESSES YOUR PERSONAL DATA</b>\r\nFor organizational and operational purposes only, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY have appointed certain entities that will also process personal data of users and customers of the www.stoneisland.com US Site. Such purposes are strictly connected to the performance of services provided on the www.stoneisland.com US Site by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY, including the sale of products.\r\nThe above-mentioned data processors have been chosen by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY because of their experience in processing personal data, their sufficient guarantees with respect to compliance with applicable laws and regulations, including the Italian Data Protection Code (Legislative Decree no. 196 of 30 June 2003) as well as the technical security measures adopted by them in connection with the processing of personal data. In processing personal data of the users of the www.stoneisland.com US Site, our processors will act only in accordance with instructions provided by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY. We regularly verify that our processors comply with our instructions and that they provide sufficient guarantees with respect to their compliance with applicable laws and regulations. The following is a list of the companies primarily involved in the processing of personal data of users and customers of the www.stoneisland.com US Site:\r\n\t•\t<a href=“http://www.ups.com/“>United Parcel Service S.p.A.(“UPS\")</a>. We provide UPS, by electronic means, with customers' addresses and other personal data for the purpose of shipping, delivering and returning products purchased on the www.stoneisland.com US Site;\r\n\t•\tBT Italia S.p.A., for purposes related to the maintenance of YOOX NET-A-PORTER GROUP servers;\r\n\t•\t<a href=“http://www.yoox.com/“>YOOX NET-A-PORTER GROUP Italy</a>. We provide YOOX NET-A-PORTER GROUP Italy with personal data of users and customers for purposes related to direct marketing services of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY and in connection with other services provided by YOOX NET-A-PORTER GROUP Italy to YOOX USA, such as call center and help desk services.\r\nPlease contact our Customer Care or send us an e-mail at <a href=“mailto:privacy@mail.stoneisland.com”>privacy@mail.stoneisland.com</a> if you would like to receive a full list of our data processors.\r\n\r\n<b>3. HOW DO WE USE PERSONAL DATA AND FOR WHAT PURPOSES</b>\r\nYour personal data are collected and processed by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY for purposes which are strictly connected to the use of the www.stoneisland.com US Site, its services and the purchase of products on the www.stoneisland.com US Site. However, your personal data may also be used for other processing operations within the limits of such purposes. In particular, your personal data may be processed for the following purposes:\r\n\t•\twhen you register with the www.stoneisland.com US Site we collect your personal data (for example, your personal information, e-mail address, gender) through the relevant registration form (My Account) in order to provide you with services in reserved access areas of the www.stoneisland.com US Site and in order to send you our Newsletter, when specifically requested;\r\n\t•\twhen you request Customer Care services, we collect your personal data (for example, your password) for purposes strictly necessary to provide you with customer care services relevant to the US Site and to the purchase of products on the US Site;\r\n\t•\twhen you request Customer Service assistance, we collect your personal data (for example, your first and last names, e-mail address and password) for purposes strictly necessary to provide you with Customer Service relevant to the www.stoneisland.com US Site and to the purchase of products on the www.stoneisland.com US Site;\r\n\t•\twhen you are executing purchasing procedures for products sold on the www.stoneisland.com US Site, including conclusion of an agreement for the purchase of products, we collect your personal data (for example, personal information, e-mail address, address, Credit Card numbers, bank account number and telephone number) on your order form only for the purpose of selling the products ordered by you;\r\n\t•\twhen you request technical assistance, we collect your personal data in order to provide you with information on net-surfing, Internet browsing or viewing and downloading web pages;\r\n\t•\twhen creating your Wish List, we process your personal data in order to customize our services for the purchase of products on the www.stoneisland.com US Site.\r\nYour personal data are generally processed by electronic means; however, in certain circumstances, paper-based means may be used (for example, when the processing of your personal data is required for the prevention of fraud against us). Your personal data are stored in a way which allows YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY to identify you for the period that is strictly necessary for the original purposes for which such personal data are collected and subsequently processed, all in accordance with applicable laws.\r\nPlease report any changes to your personal data to the e-mail address <a href=“mailto:privacy@mail.stoneisland.com”>privacy@mail.stoneisland.com</a> in order to ensure that your personal data are always accurate and kept up-to-date.\r\nYour personal data will not be disclosed to third parties for purposes not permitted by law or without your explicit consent. Your personal data may only be disclosed to third parties when it is necessary to process an order placed by you. For example, your personal data are disclosed to Banca Sella S.p.A. for the performance electronic payment services, through Credit/Debit Cards. Moreover, your personal data may be disclosed to the police or to judicial authorities, in compliance with applicable laws and regulations and upon a formal request by such authorities for the purposes of preventing a fraud against us (anti-fraud services). Data processors will also have access to your personal data, as stated in Section 2 of this Privacy Policy, for the specific purposes stated in that Section. In all the above circumstances, your consent for data processing will not be specifically requested.\r\nYour personal data will not be transferred to any countries outside the United States and Italy if such countries do not provide for an adequate level of protection of the privacy of individuals. Should the above be necessary in order to supply services to you or to execute contracts for the purchase of products, the transfer of your personal data to any such countries will be carried out only after the execution of specific contracts between YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY and all parties involved, in accordance with applicable laws and regulations.\r\nWe wish to inform you that YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY process users' personal data for purposes that are strictly connected to the supply of services through the www.stoneisland.com US Site, the execution of contracts related to the sale and purchase of products on the www.stoneisland.com US Site and, after receiving your consent, in order to send you information on new commercial initiatives which are strictly related to the www.stoneisland.com US Site's activities and services. YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY process your personal data for direct marketing purposes, including by e-mail, only after receiving your consent.\r\nYOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may have access to third parties' personal data which is directly disclosed by their users to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY, for instance when the user buys a product to be sent to a friend, when the user who pays the purchase price for a product is different from the recipient of such product, or when a user wishes to recommend to a friend a service provided through the www.stoneisland.com US Site or the sale of a particular product posted on the www.stoneisland.com US Site.\r\nIn all cases involving the disclosure of information of a third party, you must obtain the consent of such individuals before disclosing their personal data to YOOX USA, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY and have informed said individuals about this Privacy Policy. You will be the only person liable in connection with the disclosure of information and data relevant to such third parties and with any other incompatible and unlawful use of such data if they have not provided you with their consent. You agree to indemnify, defend and hold each of YOOX USA, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY harmless from any liability, claims and expenses, including reasonable attorneys' fees, arising from or related to any unauthorized disclosure of personally identifiable information of third parties.\r\n\r\n<b>4. WHAT HAPPENS IF YOU DO NOT DISCLOSE YOUR PERSONAL DATA</b>\r\nThe personal data we request you to provide to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY, including your e-mail address, your address, your Credit/Debit Card numbers, bank account number and your telephone number, is necessary for the processing of your order for the purchase of products on the www.stoneisland.com US Site, to supply other services provided on the www.stoneisland.com US Site upon your request, or to carry out obligations arising out of applicable laws and regulations.\r\nYour refusal to provide certain personal data to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may prevent YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY from processing your order for the purchase of products sold on the www.stoneisland.com US Site or from providing other services through the www.stoneisland.com US Site, such as Customer Services, sending the Newsletter, use of the Wish List, recommending a product to a friend.\r\nYour failure to provide personal data to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may prevent the processing of your order for the purchase of products sold or to provide services through the www.stoneisland.com US Site. \r\nThe disclosure of personal data to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY other than that required in order to fulfill legal or contractual obligations or to provide the services requested by you is optional and does not have any effect on the use of the www.stoneisland.com US Site and its services or on the purchase of products on the www.stoneisland.com US Site. We will inform you if the personal data we ask you to provide is necessary or optional by marking with an asterisk (*) the information that is necessary. Your failure to disclose optional personal data will not pose any obligation or disadvantage to you, except to the extent that we may no be able to offer you some of our optional, personalized features of the www.stoneisland.com US Site. \r\n\r\n<b>5. TO WHOM YOUR PERSONAL DATA WILL BE DISCLOSED</b> \r\nYour personal data may be disclosed to third parties who provide specific services as Data Processors on behalf of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY or who autonomously process personal data collected by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY in connection with the performance of a contract for the purchase of products on the www.stoneisland.com US Site (for example, Banca Sella, S.p.A.). \r\nAny such disclosure will be conducted, in each instance, without exceeding the original purposes for which your personal data were collected and subsequently processed. In addition, your personal data may be disclosed to third parties in order to (1) comply with applicable laws, (2) respond to governmental and judiciary inquiries, (3) comply with valid legal process, and (4) protect the rights or property of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY. \r\nAny third party information disclosed to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY in accordance with this Privacy Policy will not be used for any purpose other than as required to technically operate the service, to complete a transaction, or as otherwise required by law. \r\nIn the event there is a change in the corporate structure of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY including, without limitation, by merger, consolidation, sale, liquidation, or transfer of substantial assets, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may, in their sole discretion, transfer, sell or assign personal data collected on and through the www.stoneisland.com US Site, including, without limitation, personally identifiable information and aggregate information concerning users and customers, to one or more affiliated or unaffiliated third parties. \r\nIn any event, your personal data will not be disclosed to third parties without you being informed or without your consent, when such consent is required by law.\r\n\r\n<b>6. HOW DO WE COLLECT YOUR DATA ON www.stoneisland.com</b> \r\nCookies\r\nWhen you are using the www.stoneisland.com US Site, some personal data may be collected automatically through so-called \"cookies\". A cookie is a device transmitted to the hard drive of an Internet user. While cookies do not contain intelligible information, they allow us to link an Internet user to personal information provided by such user through the www.stoneisland.com US Site. YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY process information collected by cookies in a collective and anonymous way, in order to optimize our services and the www.stoneisland.com US Site for the needs and preferences of its users. We use cookies to collect users' IP addresses and other information regarding users' data traffic or preferences in the choice of services provided and products purchased through the www.stoneisland.com US Site.\r\nWe disseminate cookies in connection with functions such as browsing the catalogue, purchasing products on-line and supplying \"My Account\" services.\r\nAs you may know, each Internet browser allows the deletion of cookies after each session. Your Internet browser contains instructions on how to carry out these procedures of deletion. Please access the appropriate instructions section on your Internet browser if you wish to delete cookies. \r\nYour acceptance of our automatic procedures of collection of data and the use of cookies is necessary to take advantage of many features and services offered by the www.stoneisland.com US Site, including the purchase of products. If you set your browser to block or delete cookies, we cannot guarantee that you will have access to all the features and services offered by the US Site (for example, your computer may not be able to display the image of the product you are in the process of purchasing).\r\nOther Methods of Collecting User Information. \r\nYOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY directly collect personal data and information from users when they register on-line with the www.stoneisland.com US Site or when they send purchase orders for products sold on the www.stoneisland.com US Site in order to finalize their transactions.\r\n\r\n<b>7. SECURITY MEASURES</b>\r\nWe have adopted security measures to protect personal data against accidental or unlawful destruction, loss, alteration, unauthorized disclosure or access and against other unlawful forms of data processing, as provided in our Privacy Policy. \r\nNevertheless, YYOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY cannot guarantee that the security measures adopted for the protection of the www.stoneisland.com US Site and the transmission of data and information through the www.stoneisland.com US Site will prevent or exclude any risk of unauthorized access to or loss of data. It is advisable that your computer be equipped with software devices for the protection of network data transmission and receipt (such as, updated antivirus systems) and that your Internet service provider take appropriate measures for the security of network data transmission (such as, firewalls and anti-spam filtering).\r\n\r\n<b>8. OPT-IN/OPT OUT</b> Advertising material and direct marketing or other commercial communications which are not specifically requested by you or necessary to provide a service you requested, including the purchase of products on the US Site, will be sent to you only after we receive your consent. Please note that each time your consent is required, we will inform you in advance and we will give you the option to either provide or refuse your consent by selecting the appropriate box.\r\nYOOX and STONE ISLAND and STONE ISLAND DENIMS may process your personal data without your consent when such processing is necessary to comply with applicable laws and regulations or to provide you with services you requested, including the purchase of products on the US Site.\r\nEven when your prior consent is not necessary, you may exercise, at any time, your right not to receive future communications regarding services you requested, such as the Newsletter.\r\n\r\n<b>9. YOUR RIGHT TO ACCESS PERSONAL DATA AND FURTHER RIGHTS</b>\r\nYou are entitled to obtain, at any time, confirmation from YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY as to whether or not data relating to you is being processed, even if not yet registered, and the communication of any such data in an intelligible form. \r\nMoreover, you are entitled to receive from YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY information on the source from which we received your personal data; the purposes and means of processing your personal data; the logic involved in any electronic data processing; information regarding the data controller and the data processors and the names of subjects and categories of subjects to whom your personal data may be disclosed or who may access your personal data (for example, the names of data processors). You can also find the above information in our Privacy Policy. \r\nYou are entitled to obtain at any time from YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY:\r\n\t•\tthe updating, rectification or integration of your personal data;\r\n\t•\tthe deletion, transformation into anonymous form or blocking of your personal data, which are processed in violation of the law, including when the storage of data is not necessary for the purposes for which it has been collected and subsequently processed;\r\n\t•\tthe confirmation that the operations under letters a) and b) have been reported to whom the data were disclosed or disseminated, except when it becomes impossible to do so or if it means exceeding the protection of the right you are claiming.\r\nYou are entitled to object, in all or in part:\r\n\t•\tfor legitimate reasons, to the processing of your personal data, even if it is related to the purposes for which it was collected;\r\n\t•\tto the processing of your personal data for advertising or direct marketing purposes or in order to carry out marketing research or commercial communications.\r\nYou may freely and at any time exercise your rights, provided that you do so in compliance with applicable laws and regulations, by sending your request to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY at the following e-mail address: <a href=“mailto:privacy@mail.stoneisland.com”>privacy@mail.stoneisland.com</a>.\r\n\r\n<b>10. LINKS TO OTHER WEB SITES</b>\r\nThe www.stoneisland.com US Site may provide hyperlinks to third party websites (the \"Third Party Websites\"). YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY do not operate, control, endorse or guarantee any Third Party Websites. You agree that and SPORTSWEAR COMPANY are not responsible for any content, services and/or products provided by any Third Party Website, nor are YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY responsible for any practice followed by such Third Party Website with respect to the collection and processing of personal data of their users. When you access any Third Party Website through a hyperlink posted on the www.stoneisland.com US Site, please carefully read the Privacy Policy and other policies of such Third Party Website.\r\nOur Privacy Policy and other policies do not apply to any Third Party Website. YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY provide hyperlinks to Third Party Websites only for the convenience of our users. By providing hyperlinks to Third Party Websites, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY do not recommend that users access such Third Party Websites.\r\nYOU AGREE THAT YOUR USE OF ANY THIRD PARTY WEBSITE IS AT YOUR SOLE RISK AND WITHOUT WARRANTIES OF ANY KIND BY YOOX, YOOX USA, AND/OR SPORTSWEAR COMPANY, EXPRESSED, IMPLIED OR OTHERWISE, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NONINFRINGEMENT. UNDER NO CIRCUMSTANCES ARE YOOX, YOOX USA, AND/OR SPORTSWEAR COMPANY LIABLE FOR DAMAGES ARISING FROM ANY TRANSACTION BETWEEN YOU AND ANY THIRD PARTY WEBSITE OR FOR ANY INFORMATION APPEARING ON THIRD PARTY WEBSITES. \r\n\r\n<b>11. CONTACTS</b>\r\nIf you wish to receive further information regarding our privacy practices, please contact us at the following e-mail address: <a href=“mailto:privacy@mail.stoneisland.com”>privacy@mail.stoneisland.com</a>. For more information regarding your rights under the Italian Data Protection Code, please go to the web site of the Italian Data Protection Authority at <a href=“http://www.garanteprivacy.it/ “>www.garanteprivacy.it</a>. \r\n\r\n<b>12. GOVERNING LAW</b>\r\nThe processing of personal data by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY will be conducted in compliance with applicable US laws. The laws of Italy, including the Italian Personal Data Protection Code (Legislative Decree no. 196 dated June 30, 2003), also apply to the processing of personal data carried out by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY (see the Companies of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY Group). The Italian Personal Data Protection Code guarantees that the processing of your personal data will be carried out in compliance with the fundamental rights and freedoms of individuals and their dignity, with particular reference to confidentiality, identity and the right to personal data protection. \r\n\r\n<b>13. MODIFICATION AND UPDATING</b>\r\nYOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may amend or update from time to time all or any part of this Privacy Policy, whether or not required by a change in the applicable laws and regulation. Our users will be notified of any amendment to or update of our Privacy Policy on our homepage. All amendments and updates will become effective upon publication on this section of the www.stoneisland.com US Site. You should regularly access this section of the www.stoneisland.com US Site in order to review the most recent and updated version of our Privacy Policy.", + "__index": "2", + "dateCreated": "Tue, 17 Nov 2015 20:32:07 GMT", + "tag": "privacy" + }, + { + "id": "returns-policy", + "title": "Returns Policy", + "image": { + "uri": "", + "caption": "" + }, + "body": "We want to make sure that you are completely satisfied with your purchases on this Site. If, for any reason, you are not satisfied with your order, you may return any UNUSED products within twenty (20) days from the date of delivery. Before sending any products back to us, please make sure that all of the following conditions have been correctly satisfied. \r\nThe product you wish to return:\r\n<li>can be sent back to us only after you have completed and submitted the online <a href=“http://www.stoneisland.com/localize.asp?tskay=4036416C&page=help/return&”>Return Form</a> available on the www.stoneisland.com US Site within twenty (20) days of delivery; by completing and submitting our online return form you will receive your Return Number, which you must include on your return shipping label;</li>\r\n<li>must be unused, unworn, unwashed and in the same condition in which it was received by you;</li>\r\n<li>must have all disposable seals still attached with the disposable seal that must still be intact;</li>\r\n<li>must be returned complete with all of its parts and accessories;</li>\r\n<li>must be sent in its original packaging;</li>\r\n<li>must be shipped back to our fulfillment house within twenty (20) days of the date of delivery;</li>\r\n<li>must be sent in one single shipment; products that belong to the same order must be returned to us at the same time; and</li>\r\n<li>must be shipped from the United States.</li>\r\nIf all of these conditions are satisfied, we will refund the value of the returned product(s), Sales Tax included, less any original shipping costs. If you send the package with UPS, return shipping costs charged to the customer will correspond to $6.00. If you prefer you can send the return at your expense, with a courier of your choice. We will not issue any refunds for returns that do not satisfy all of the conditions indicated above; provided, however, that you will have the option to request within thirty (30) days of being notified that you are not entitled to a refund that your merchandise be shipped back to you, at your own cost, in the condition in which it was received by Provider’s fulfillment house.\r\nIf you do not request the return of your merchandise within said thirty-day period, you authorize Provider, and any of its affiliates or agents, to dispose of such merchandise as it sees fit. \r\n\r\nSALES OF BEACHWEAR AND UNDERWEAR ARE FINAL. WE RESERVE THE RIGHT TO DESIGNATE ON THE SITE OTHER NON-RETURNABLE MERCHANDISE. ANY SUCH DESIGNATION WILL BE NOTED ON THE DETAIL PAGE OF THE MERCHANDISE WHICH IS NON-RETURNABLE. \r\n\r\n<b>REFUND POLICY</b>\r\nRefunds are processed within approximately three (3) business days of our receipt of your merchandise. Your refund will be credited back to the same payment method used to make the original purchase on the US Site. If you paid by credit card, refund times will depend on the credit or debit card company’s policies. Be aware that the refund date for the credit will coincide with the date of the original payment, therefore you will not be charged any interest fees. If you paid by PayPal (where available), refunds will be credited to your PayPal account and will be visible immediately. The date of reimbursement to the credit card associated with your PayPal account depends on the company that issued the card. WE OFFER NO REFUNDS ON ANY PRODUCTS DESIGNATED ON THIS SITE AS NON-RETURNABLE. \r\n\r\n<b>IDENTIFICATION TAG</b>\r\nAll of our products come with an identification tag with a disposable seal. Please try your item on before removing the tag and seal, since we do not accept returns once the disposable seal has been removed, broken or damaged in any way. Shoes come with a sticker under the sole; if you remove or alter this sticker, you may no longer return your purchase. \r\n\r\n<b>UPS</b>\r\nYour return can be sent to us by UPS, using the pre-printed label which you can find within the original shipment. If you send the package with UPS, return shipping costs charged to the customer will correspond to $6.00. Please visit <a href=“https://www.ups.com/dropoff?loc=en_US “>http://www.ups.com/dropoff?loc=en_US</a> to find the UPS drop-off location nearest to you. If you prefer you can send the return at your expense, with a courier of your choice. We are not responsible for any loss or damage to products if you ship your return without using UPS. \r\n\r\nWE OFFER NO EXCHANGES ON MERCHANDISE PURCHASED ON THE www.stoneisland.com US SITE\r\n\r\nDISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITY\r\n\r\nPROVIDER MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE PRODUCTS INCLUDED ON THE SITE NOR AS TO THE MERCHANDISE BEING SOLD TO YOU. TO THE FULLEST EXTENT PERMISSIBLE BY APPLICABLE LAW, PROVIDER DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT, AND THERE ARE NO WARRANTIES, EXPRESS OR IMPLIED, WHICH EXTEND BEYOND THE DESCRIPTION OF THE MERCHANDISE CONTAINED ON OUR ORDER CONFIRMATION. PROVIDER WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF THE SITE, INCLUDING BUT NOT LIMITED TO DIRECT, INDIRECT, INCIDENTAL, PUNITIVE AND CONSEQUENTIAL DAMAGES. \r\n\r\nCERTAIN STATE LAWS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES OR THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES. IF THESE LAWS APPLY TO YOU, SOME OR ALL OF THE ABOVE DISCLAIMERS, EXCLUSIONS, OR LIMITATIONS MAY NOT APPLY TO YOU, AND YOU MIGHT HAVE ADDITIONAL RIGHTS.\r\n\r\n<b>Force Majeure</b>\r\nProvider shall not be liable for any delay or failure in performance caused by circumstances beyond its reasonable control.", + "__index": "3", + "dateCreated": "Tue, 17 Nov 2015 21:03:44 GMT", + "tag": "returns" + }, + { + "id": "customer-care", + "title": "Customer Care", + "image": { + "uri": "", + "caption": "" + }, + "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam blandit in risus sit amet maximus. Phasellus ullamcorper auctor fermentum. Aenean diam libero, rhoncus vel efficitur sed, dictum vel neque. Aliquam mollis leo vitae est vehicula, non pulvinar elit congue. Phasellus sit amet mauris neque. Integer volutpat nisl est, vel finibus purus lacinia vehicula. Proin dapibus velit quis sapien ultricies accumsan. Sed accumsan dui id porta efficitur.\r\n\r\nCurabitur pretium ut libero a varius. Morbi in lacinia felis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam dolor justo, consequat eu lectus at, interdum sollicitudin arcu. Nunc accumsan velit volutpat, venenatis leo eu, rhoncus nibh. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus semper consequat ipsum, sed fringilla ligula tincidunt at.\r\n\r\nMauris vehicula, purus ut iaculis facilisis, mi leo dignissim libero, at lobortis lectus odio consequat urna. Etiam accumsan volutpat nibh, eget ultricies mi feugiat eu. Duis id aliquam enim. Pellentesque quis enim eu dolor bibendum interdum. Cras ultrices erat velit, eu volutpat erat consequat non. Nam ut nibh facilisis, egestas sapien vitae, scelerisque sapien. Nullam tortor ex, convallis vel nisi vitae, efficitur dapibus nunc. In hac habitasse platea dictumst. Nam posuere ligula lorem, sit amet ultricies odio tristique in. Etiam gravida tincidunt mollis. Duis quis nulla ligula. Etiam ut vehicula tellus. Sed ipsum lacus, tincidunt sit amet velit et, aliquet hendrerit erat. Nam sed velit dapibus, congue odio non, ultrices ligula. Suspendisse at quam eu lorem finibus ultricies id tempus lorem. Nulla vel quam luctus, viverra nulla cursus, faucibus tellus.\r\n\r\nPraesent magna ex, posuere at hendrerit varius, auctor a nisl. Nullam sodales erat ut nisl vestibulum luctus. Donec id sagittis orci. Cras imperdiet, erat non dictum feugiat, elit turpis viverra neque, interdum cursus mi turpis vitae dolor. Suspendisse potenti. Aenean et auctor diam, vel eleifend eros. Praesent viverra felis at enim elementum fermentum. Etiam convallis, elit porta molestie condimentum, arcu ligula vestibulum nisi, et aliquet massa tellus quis eros. Aliquam a dignissim tellus, non ullamcorper purus. Phasellus in risus mattis dui vehicula cursus in at urna.\r\n\r\nCurabitur laoreet lorem eu euismod volutpat. Suspendisse vulputate aliquet tempor. Pellentesque purus augue, eleifend a maximus eu, commodo nec felis. Mauris mattis turpis nec volutpat tincidunt. Mauris imperdiet ante at orci mollis sagittis. Etiam lacus risus, consectetur ut dui non, pulvinar pulvinar libero. Aliquam ut rhoncus justo, quis sollicitudin nisi. Proin et iaculis sem. Pellentesque id tempor elit, et tincidunt nunc. Quisque laoreet et massa quis imperdiet. Morbi dapibus, felis sed auctor porttitor, massa nunc sollicitudin urna, non congue odio enim eget nisi. Suspendisse semper vehicula nisl vitae vehicula. Maecenas sed justo quis nisi auctor ultrices. Nam vel dolor fringilla, accumsan nulla eu, rutrum ex. Donec ante quam, molestie vel ex eget, dictum luctus nunc. Phasellus tincidunt libero non quam finibus, at convallis sem laoreet.\r\n\r\nDonec consequat, leo tincidunt elementum consectetur, nisl augue sollicitudin dolor, vel fringilla dui lorem non enim. Morbi id arcu felis. Integer malesuada ex enim, sed consectetur massa condimentum id. In mollis libero eu neque sollicitudin, sit amet interdum orci bibendum. Curabitur tincidunt purus vel vestibulum placerat. Aliquam erat volutpat. Praesent ac eros diam. Mauris ultrices euismod sodales. Vestibulum dui leo, auctor sit amet finibus eu, suscipit eu diam. Cras ac rhoncus turpis, at sagittis mi. Praesent urna metus, euismod vitae nunc eget, suscipit auctor lectus. Pellentesque maximus arcu justo. Duis mi arcu, rutrum et vulputate nec, mattis sit amet risus. Donec posuere velit sed enim accumsan, eu lobortis nulla sagittis.\r\n\r\nDonec viverra consectetur turpis sit amet malesuada. Sed sit amet urna luctus, sodales est porta, aliquam mi. Curabitur et ullamcorper odio, dapibus facilisis nisl. Fusce tortor leo, mattis sit amet massa ut, ultrices aliquam massa. Pellentesque consectetur metus in molestie egestas. Quisque vehicula at mauris ut eleifend. Duis eu ipsum quis ipsum bibendum luctus.\r\n\r\nSed sed viverra diam. Quisque lacinia nisl orci. Fusce vulputate dui ut nunc vulputate feugiat. Praesent felis quam, semper nec dapibus eget, venenatis vitae leo. Maecenas rutrum egestas dapibus. Vestibulum sodales molestie varius. Ut ac laoreet est, nec posuere ipsum. Cras ac eros sapien. Quisque eu dui lorem. Donec congue varius tortor ac ullamcorper. Curabitur vulputate faucibus finibus. Donec tellus neque, euismod ac aliquet at, vehicula in mauris. Vivamus justo nulla, maximus sit amet quam ac, vulputate dapibus purus. Mauris ante urna, posuere varius vehicula sed, fringilla sed quam. In eget ex tincidunt, ultrices elit id, congue quam. Suspendisse congue tristique dolor, rhoncus venenatis purus tempor at.\r\n\r\nVivamus efficitur, odio in tempor rutrum, quam nunc congue orci, non posuere lorem lacus et arcu. Aenean sit amet diam quis dui dapibus semper ac vitae est. Aenean ornare arcu justo, id sodales odio maximus interdum. Curabitur sit amet augue pretium metus bibendum imperdiet vitae vitae nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc euismod ante eu justo mollis dignissim. Maecenas et velit eu lorem laoreet ornare. Sed accumsan est nec rutrum dignissim.\r\n\r\nIn bibendum mattis ligula. Pellentesque gravida felis sed congue viverra. Nam volutpat quam at velit sodales, nec egestas dolor consectetur. Etiam id tortor tincidunt, sollicitudin risus ut, lacinia diam. Morbi consequat euismod justo vitae sagittis. Pellentesque interdum orci ligula, tincidunt maximus nulla sollicitudin sed. Duis finibus odio eros, eget consequat ante tristique ac. Suspendisse at interdum leo. Nunc sagittis ante ac felis iaculis fermentum. Sed elementum dictum dictum. Aliquam eget metus molestie, varius mi ac, auctor quam.", + "__index": "4", + "dateCreated": "Tue, 17 Nov 2015 21:03:57 GMT", + "tag": "care" + } + ], + "store": [ + { + "id": "stone-island", + "title": "STONE ISLAND", + "StoreIsOpen": "false", + "ClosedStoreImages": [ + { + "uri": "https://marsupial.s3.amazonaws.com/stoneisland/cfffd4b0-14b7-11e7-b4a1-69af24d3ff84.jpg", + "width": "580", + "height": "813", + "caption": "" + } + ], + "__index": 0, + "dateCreated": "Fri, 20 Nov 2015 00:45:03 GMT", + "collection": "", + "FitsLarge": "false", + "BackgroundIsGray": "false", + "CollectionId": "", + "StoreStatus": "closed", + "OpensOn": "", + "DepartmentId": "", + "StoreClosedMessageOne": "", + "StoreClosedMessageTwo": "", + "FittingCodes": "", + "DepartmentStoreStatus": "closed", + "Departments": [ + { + "text": "STONE ISLAND MARINA_CORROSION PRINT <br>& ORTLIEB DRY BAGS", + "uri": "DrpppMrnCrrsn" + } + ], + "GroupBy": "size", + "FilterBy": "size", + "ShowProductNameOnCollectionPage": true + } + ] +}
\ No newline at end of file diff --git a/StoneIsland/platforms/android/assets/www/index.html b/StoneIsland/platforms/android/assets/www/index.html index 28c4f8c6..0b10cd52 100755 --- a/StoneIsland/platforms/android/assets/www/index.html +++ b/StoneIsland/platforms/android/assets/www/index.html @@ -262,7 +262,6 @@ <div class="gallery-right"></div> <div class="content"> <div class="product-header"> - <span class="num"></span> <span class="title"></span> </div> <div class="type-price"> @@ -293,10 +292,9 @@ <div id="closed"> <div class="closed_store_msg"> <h3> - THIS STORE IS CURRENTLY CLOSED + LOADING THE STORE, PLEASE WAIT </h3> <h4> - WE WILL REOPEN FEBRUARY 1ST </h4> <div class="website_link"> visit<br> @@ -1138,6 +1136,7 @@ <script src="js/lib/products/CollectionView.js"></script> <script src="js/lib/products/filters/CategoryFilter.js"></script> <script src="js/lib/products/filters/DepartmentFilter.js"></script> +<script src="js/lib/products/filters/SizeFilter.js"></script> <script src="js/lib/products/ClosedStoreView.js"></script> <script src="js/lib/products/ProductView.js"></script> <script src="js/lib/products/GalleryView.js"></script> diff --git a/StoneIsland/platforms/android/assets/www/js/index.js b/StoneIsland/platforms/android/assets/www/js/index.js index 06bfaaac..a28faabf 100755 --- a/StoneIsland/platforms/android/assets/www/js/index.js +++ b/StoneIsland/platforms/android/assets/www/js/index.js @@ -4,7 +4,13 @@ var app = (function(){ app.init = function(){ console.log("init") - sdk.init({ env: "production" }) + if (window.location.hostname === 'lvh.me' || window.location.hostname === 'stone.giraffe.life' || window.location.hostname === 'dev.stone.giraffe.life') { + console.log('launching in test mode') + sdk.init({ env: "test" }) + } + else { + sdk.init({ env: "production" }) + } app.bind() app.build() diff --git a/StoneIsland/platforms/android/assets/www/js/lib/_router.js b/StoneIsland/platforms/android/assets/www/js/lib/_router.js index 9927712a..43438854 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/_router.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/_router.js @@ -87,6 +87,9 @@ var SiteRouter = Router.extend({ else { app.view = app[name] } + + window.FirebasePlugin && window.FirebasePlugin.setScreenName(name) + app.header.set_back( !! app.view.back ) app.view.show() }.bind(this) diff --git a/StoneIsland/platforms/android/assets/www/js/lib/account/AccountView.js b/StoneIsland/platforms/android/assets/www/js/lib/account/AccountView.js index 9e6f1714..80738be0 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/account/AccountView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/account/AccountView.js @@ -22,6 +22,7 @@ var AccountView = View.extend({ ccLookup: {}, listAddresses: function(opt){ + opt = opt || {} sdk.address.list({ success: function(data){ this.populateAddresses(data, opt.success) diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/BlogView.js index 5ee7f641..fd7b5212 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/BlogView.js @@ -9,8 +9,8 @@ var BlogView = View.extend({ fetch: function(fn){ $.ajax({ method: "GET", -// url: sdk.env == 'test' ? '/db.json' : "https://stone.sup.land/db.json", - url: "https://stone.sup.land/db.json", + url: sdk.env === 'test' ? '/db.json' : sdk.cms() + '/db.json', + // url: "https://stone.giraffe.life/db.json", success: function(data){ this.success(data) fn && fn() @@ -31,24 +31,41 @@ var BlogView = View.extend({ this.loaded = true this.data = data = typeof data == "string" ? JSON.parse(data) : data - switch (data.store[0].DepartmentStoreStatus) { + // sdk.env = 'test' + + if (sdk.env === 'test') { + app.store = data.store[1] + } + else { + app.store = data.store[0] + } + + switch (app.store.DepartmentStoreStatus) { case "open": app.closed.storeIsClosed = false break case "closed": app.closed.storeIsClosed = true - app.closed.storeClosedMessageOne = data.store[0].StoreClosedMessageOne - app.closed.storeClosedMessageTwo = data.store[0].StoreClosedMessageTwo + app.closed.storeClosedMessageOne = app.store.StoreClosedMessageOne + app.closed.storeClosedMessageTwo = app.store.StoreClosedMessageTwo break } - - if (app.closed.storeIsClosed) { - app.closed.populate(data.store[0].ClosedStoreImages) + + if (app.closed.storeIsClosed && sdk.env !== 'test') { + app.closed.populate(app.store.ClosedStoreImages) } else { - app.departments = data.store[0].Departments - app.department_id = data.store[0].Departments[0].uri - app.collection.setCollectionName( data.store[0].Departments[0].text ) + app.departments = app.store.Departments + app.department_id = app.store.Departments[0].uri + $("#collections h1").toggleClass("single-dept", app.store.Departments.length == 1) + app.collection.setCollectionName( app.store.Departments[0].text ) + //// demo department for shoes with weird SizeTypeId + // app.department_id = "NKDrtSC" + if (sdk.env === 'test') { + app.department_id = window.location.search.substr(1) || app.department_id + console.log('using test department id', app.department_id) + // app.department_id = 'TSTSZS' + } app.collection.loaded = false app.collection.fetch() } @@ -69,16 +86,16 @@ var BlogView = View.extend({ app[page.tag].populate(page) }) - console.log(data.store[0].StoreStatus) + console.log(app.store.StoreStatus) app.product.fitLargeCodes = {} - if (data.store[0].FittingCodes.length) { - data.store[0].FittingCodes.split("\n").forEach(function(code){ + if (app.store.FittingCodes.length) { + app.store.FittingCodes.split("\n").forEach(function(code){ app.product.fitLargeCodes[code] = true }) } - if (data.store[0].BackgroundIsGray === "true") { + if (app.store.BackgroundIsGray === "true") { app.collection.$el.addClass("gray") app.product.gallery.$el.addClass("gray") } diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js index 013c2b45..38a7eecf 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js @@ -140,6 +140,7 @@ var HubView = ScrollableView.extend({ var HubLoader = (function(){ var queue, view, item, loader + var count = 0 var HubLoader = {} var loader HubLoader.init = function(v){ @@ -151,6 +152,7 @@ var HubLoader = (function(){ } HubLoader.load = function(){ item = queue.shift() + count++ if (! item) return if (item.image && item.image.length) { loader = new Loader (HubLoader.build) @@ -159,7 +161,7 @@ var HubLoader = (function(){ }).filter(function(img){ return img.uri }) - loader.preloadImages(images) + loader.preloadImages(images, true) } else { HubLoader.build() @@ -168,7 +170,7 @@ var HubLoader = (function(){ HubLoader.build = function(){ view.append(item) view.scroller.refresh() - setTimeout(HubLoader.load, 20) + setTimeout(HubLoader.load, count < 4 ? 50 : 5000) } return HubLoader })() diff --git a/StoneIsland/platforms/android/assets/www/js/lib/etc/backup_db.js b/StoneIsland/platforms/android/assets/www/js/lib/etc/backup_db.js index eec5c415..dce8835a 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/etc/backup_db.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/etc/backup_db.js @@ -310,11 +310,11 @@ var BACKUP_DB = { ], "hub": [ { - "id": "ss_-016-collection-preview", + "id": "loading", "date": "Tue, 12 Jan 2016 12:00:00 GMT", - "title": "SS_'016 COLLECTION PREVIEW", - "subtitle": "Stone Island App exclusive 1/12-1/19", - "body": "The unrelenting research by Stone Island results in a collection full of textiles evolutions, finishing and dyeing, featuring pop colors and extraordinary visual effects.\r\n\r\n44447 NYLON METAL WATRO\r\nHooded blouson in Nylon Metal. Hood with half lining in cotton and half in nylon mesh. Slanting hand pockets with windproof entrance and zip fastening. Adjustable strap at cuffs. Drawstring in bottom hem. Zip fastening. \r\nNYLON METAL WATRO: The trilobate structure of the nylon yarn, with its grey weft and white ready to dye warp colors, is the grounds of the distinctive metallic and tonic sheen of Nylon Metal, one of the most versatile fabrics born of Stone Island’s textile research. The fabric is resin treated inside to achieve a mild wind and water resistance The finished piece undergoes an elaborate double dye procedure providing different tones, intensities and colors to the fibers and textile accessories of the garment. The addition of a special agent to the dye formula makes the piece anti-drop.\r\n\r\n10544 NYLON METAL \r\nOver shirt in Nylon Metal. Garment dyed. Hook fastening collar. On seam pocket along central placket, with snaps fastening. Snap-fastened cuffs. Hidden zip and snap fastening.\r\nNYLON METAL: The trilobate structure of the nylon yarn, with its grey weft and white ready to dye warp colors, is the grounds of the distinctive metallic and tonic sheen of Nylon Metal, one of the most versatile fabrics born of Stone Island’s textile research. The finished piece undergoes an elaborate double dye procedure providing different tones, intensities and colors to the fibers and textile accessories of the garment. The addition of a special agent to the dye formula makes the piece anti-drop.\r\n\r\n70532 POLYESTER SHANTUNG\r\nParka in an organic looking polyester. Hood with visor and chin strap adjustable with Velcro. Two bellows pockets on chest with flap closed by hidden snaps. Two welt pockets closed by a zip with a second snap opening that holds a cotton tape belt. Snap fasteners at cuffs. Zip and hidden button fastening.\r\nPOLYESTER SHANTUNG: organic looking polyester material with a shantung effect. The organic look is given by the highly technological spinning of the raw material and by its super tight weaving. The pieces are sewn and then garment dyed under pressure at 130°C with the addition of an anti-drop agent. The high pressure dye process compacts the material and induces the high absorption of the color recipe.\r\n\r\n41923 MEMBRANA 3L TC\r\nHooded jacket in a light 3 layers fabric. Garment dyed. Adjustable straps on hood with elasticated gathering on back. Patch pockets with zip fastening. Adjustable straps at cuffs. Elasticated adjustable drawstring on bottom edge. Zip fastening. \r\nMEMBRANA 3L TC: 3 layer light performance fabric made from an opaque nylon outer face laminated to a breathable, water resistant, windproof membrane, protected by an impalpable polyester base. Stone Island’s expertise in garment dyeing gives an outstanding color to the outer face while preserving the performance features of the inner membrane. The addition of a special agent to the dye formula makes the piece anti-drop.\r\n\r\n65260 T.CO+OLD\r\nHooded full zip sweatshirt in malfilé cotton, garment dyed to create the OLD effect, an exclusive dyeing treatment and subsequent fading on the finished garment to create a slightly worn and three-dimensional appearance. Hood drawstring in contrasting color. Pouch pockets. Ribbed side band, cuffs and bottom band. Zip fastening.\r\n\r\n530B0\r\nCardigan knit in plain stitching cotton nylon. Raised collar with concealed hood in Nylon Metal. Garment dyed. On seam pockets. Plain cuffs and bottom band with inner ribbing. Zip fastening.\r\nNYLON METAL: The trilobate structure of the nylon yarn, with its grey weft and white ready to dye warp colors, is the grounds of the distinctive metallic and tonic sheen of Nylon Metal, one of the most versatile fabrics born of Stone Island’s textile research. ", + "title": "STONE ISLAND", + "subtitle": "", + "body": "The unrelenting research by Stone Island results in a collection full of textiles evolutions, finishing and dyeing, featuring pop colors and extraordinary visual effects.", "link": "", "store": "true", "image": [ @@ -322,155 +322,9 @@ var BACKUP_DB = { "uri": "https://ltho.s3.amazonaws.com/1ee6abef-0677-41a6-91eb-029303995073.png", "caption": "" }, - { - "uri": "https://ltho.s3.amazonaws.com/8cc1876a-10c7-4dc5-af66-18f5d1a30727.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/f83bf094-ddee-4d26-938e-d98eef0cb0eb.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/095b2d00-cda6-4275-a475-cf2b27965c29.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/b7b299c4-0f24-4d27-91c3-b2a0856e49f0.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/cb2378dd-2eff-4d92-a942-63da8f3afcea.png", - "caption": "" - } ], "__index": 1, "dateCreated": "Tue, 12 Jan 2016 15:55:24 GMT" - }, - { - "id": "nikelab-x-stone-island-windrunner", - "date": "Wed, 09 Dec 2015 12:00:00 GMT", - "title": "NikeLab x Stone Island Windrunner", - "subtitle": "", - "body": "<b>NikeLab partners with Stone Island to deliver a unique interpretation of its foremost apparel icon, to celebrate the beginning of “The Year of Windrunner.</b>\r\n\r\n “An exciting co-lab. Stone Island loves challenges. We source our strength from challenges. It’s a great satisfaction to share our knowhow and expertise with Nike”.\r\n<i>Carlo Rivetti – Stone Island President and Creative Director</i>\r\n \r\nThe Nike Windrunner was born during a time of firsts. Created by Nike’s first apparel designer in 1978 and revolutionary for its raglan sleeves and 26-degree chevron yoke, the jacket became the first piece of Nike apparel worn by athletes at track and field trials before and after competition. Today, to commemorate this running icon, the Nike Windrunner experiences another first, the fabric innovation, the engineering and garment dyeing techniques of Stone Island.\r\n \r\nIn 2016 Nike is celebrating its foremost apparel icon: the Nike Windrunner Jacket. Designed in the late ‘70s, the silhouette has been a fixture on medal stands and city streets ever since. In the launch edition of this yearlong celebration Nike and Stone Island merge the distinctiveness of two brands to create a unique garment.\r\n \r\nThe chevron and hood of the NikeLab x Stone Island Windrunner are constructed with water and wind-resistant Mussola Gommata fabric, formed by bonding lightweight cotton muslin to an opaque polyurethane film. Nylon Metal, a proprietary Stone Island fabric with a metallic sheen, is featured on the body of the garment, which is lined with PrimaLoft®.\r\n \r\nWhile the exterior of the jacket is monochromatic, it mimics the traditional Nike Windrunner color blocking through Stone Island’s garment dyeing process. The result is a subtle distinction between the shades of the Mussola Gommata and Nylon Metal fabrics. The silver PrimaLoft® lining provides a stunning contrast to the monochromatic exterior, while the oversized trims contribute to a rugged look.\r\n \r\nThe NikeLab x Stone Island Windrunner will be available on December 17th at 10am PST from the Stone Island App and selected NikeLab retailers and on nike.com/nikelab.", - "link": "http://www.stoneisland.com/experience/us/nikelab-x-stone-island/", - "store": "true", - "image": [ - { - "uri": "https://ltho.s3.amazonaws.com/de454e51-59d6-4442-9faa-70d95203f6dd.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/faeb5522-8793-4a81-882f-3c378cef3192.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/1c7b2292-f4c9-4d4e-869a-4d4cad2a3820.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/0444066e-e3e7-484f-b932-43c855e2fa96.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/d5577c40-4e42-4738-be8b-12066f7a4301.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/540f859f-9684-412d-a012-bb1c2bd45bf6.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/a92f9dd6-09d2-48fb-8858-7c12693c302e.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/a46824b3-90ad-466d-97ab-090022363fa7.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/e234f3cb-38d8-442a-9bb9-95a90b166d20.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/607814ee-1435-42f5-b52d-fb7fe2001b6d.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/21475b14-e216-438a-8673-106d9322bf3e.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/131e1276-aed1-4790-8ab9-333393c3885a.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/e2808d55-7d9a-4c99-842d-16a0a300c93d.png", - "caption": "" - } - ], - "__index": 4, - "dateCreated": "Tue, 12 Jan 2016 16:02:48 GMT" - }, - { - "id": "nikelab-x-stone-island-koth-ultra-mid-si", - "date": "Wed, 09 Dec 2015 12:00:00 GMT", - "title": "NikeLab x Stone Island Koth Ultra Mid SI", - "subtitle": "", - "body": "Inspired by the Nike Air Mowabb, the revolutionary 1991 sneaker-hiker hybrid, this all-weather Nike Koth Ultra Mid SI Shoe is made in Nike water resistant materials, real leather, and in Mussola Gommata, a fabric issued from the Stone Island research and treatment research, an exclusive panel dyed material made by bonding an extremely light cotton muslin to an opaque polyurethane film. The shoe features aggressive traction and flexible ankle support. Unitsole foam midsole for cushioning and durable support. Waffle rubber lugs for rugged traction and durability. Flex grooves allow for natural range of motion. Heel loop for easier on and off. Heel overlay for enhanced support. The shoe dust bag is made in 2 Stone Island fabrics, Nylon Metal, nylon canvas with a distinctive metallic and iridescent sheen, 50 Fili, a cotton/nylon canvas, both panel dyed.\r\n\r\nThe NikeLab x Stone Island Koth Ultra Mid SI will be available on December 17th at 10am PST from the Stone Island App and selected NikeLab retailers and on nike.com/nikelab.\r\n", - "link": "http://www.stoneisland.com/experience/us/nikelab-x-stone-island/", - "store": "true", - "image": [ - { - "uri": "https://ltho.s3.amazonaws.com/dd5f611f-3800-49ed-a6b1-9f6dd06cc103.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/34185ef2-1658-4472-bc3a-4d3f0c23ba2f.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/4767f114-1e8e-4ed3-856c-74f6c4342f0f.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/ed510070-9f60-45a6-aebf-2e7684b67cb3.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/c32af490-4ae5-4040-9327-02ce8808ee71.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/b913fc7d-d5d8-4047-b252-c2f404d9cb3e.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/3bea1cd4-2529-4a06-99ec-ec55c5a9f8d5.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/e29264fd-4236-4d16-938f-7dbe264c9b88.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/9c445717-dc18-4e0f-95f4-f695b13547a2.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/63cb328c-2624-4ed1-9d1e-113649be7f26.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/8ef50cce-c89d-4642-98b9-3be6ff798727.png", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/46f320b1-b908-42b5-9cad-20689c4d0d23.png", - "caption": "" - } - ], - "__index": 5, - "dateCreated": "Tue, 12 Jan 2016 16:03:00 GMT" } ], "page": [ diff --git a/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js b/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js index da63fdd1..082692ec 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js @@ -2,28 +2,38 @@ var push = (function(){ var push = { settings: {}, disabled: false } var pushPlugin push.init = function(){ - if (device.platform !== "ios") { + if (! ('device' in window) || (device.platform || "").toLowerCase() !== "ios") { + console.log("push disabled") push.disabled = true return } - pushPlugin = PushNotification.init({ - ios: { - alert: true, - badge: true, - sound: false, - clearBadge: true, - }, - }) - console.log("push init") - PushNotification.hasPermission(push.did_initialize) - pushPlugin.on('registration', push.got_registration) - pushPlugin.on('notification', push.got_push_notification) + window.FirebasePlugin.hasPermission(function(data){ + push.did_initialize() + }) + + window.FirebasePlugin.getToken(function(token) { + push.got_registration(token); + }, function(error) { + console.error(error); + }); + + window.FirebasePlugin.onTokenRefresh(function(token) { + // save this server-side and use it to push notifications to this device + push.got_registration(token); + }, function(error) { + console.error(error); + }); + + // PushNotification.hasPermission(push.did_initialize) } push.did_initialize = function(data) { + console.log(data) if (! data.isEnabled) { + console.log("push did not initialize") + window.FirebasePlugin.grantPermission() return } console.log("push did initialize") @@ -41,8 +51,8 @@ var push = (function(){ push.subscribe("store") } } - push.got_registration = function(data){ - var registrationId = data.registrationId + push.got_registration = function(token){ + var registrationId = token var oldRegistrationId = localStorage.getItem("yoox.registrationId") console.log(registrationId, oldRegistrationId) @@ -62,12 +72,12 @@ var push = (function(){ channel: channel, platform: device.platform, } - pushPlugin.subscribe(channel, function(){ + window.FirebasePlugin.subscribe(channel, function(){ console.log("subscribed to", channel) }) $.ajax({ method: "POST", - url: "https://stone.sup.land/_services/push/add", + url: push.url('add'), data: data, contentType: 'application/x-www-form-urlencoded; charset=UTF-8', success: function(){ @@ -88,40 +98,55 @@ var push = (function(){ } $.ajax({ method: "POST", - url: "https://stone.sup.land/_services/push/remove", + url: push.url('remove'), data: data, contentType: 'application/x-www-form-urlencoded; charset=UTF-8', success: function(){ + window.FirebasePlugin.unsubscribe(channel) console.log("unsubscribed from", channel) cb && cb() }, error: push.error, }) } + push.url = function(key){ + return sdk.cms() + '/_services/push/' + key + } push.got_push_notification = function(push_obj) { - // alert('We received this push notification: ' + JSON.stringify(push_obj)); + // console.log('We received this push notification: ' + JSON.stringify(push_obj)); + app.blog.refresh() + + push_obj.additionalData = push_obj.additionalData || {} + + var is_hub = true try { - var is_hub = JSON.stringify(push_obj || {}).match(/hub/i) - if (is_hub) { - app.intro.$alert.show().html("[ HUB UPDATED ]") - } - else { - auth.clear_cart() - app.intro.$alert.show().html("[ STORE UPDATED ]") - } + is_hub = JSON.stringify(push_obj || {}).match(/hub/i) } catch (e) { + } + + if (is_hub) { app.intro.$alert.show().html("[ HUB UPDATED ]") } + else if (! push_obj.additionalData.url) { + auth.clear_cart() + app.intro.$alert.show().html("[ STORE UPDATED ]") + } if (push_obj.additionalData.foreground === false) { // TODO: route the user to the uri in push_obj - pushPlugin.finish(function(){}, function(){}) + // pushPlugin.finish(function(){}, function(){}) + if (push_obj.additionalData.url) { + app.router.go(push_obj.additionalData.url) + } + } + else if (is_hub) { + app.router.go("hub") } else { - app.route("intro") + app.router.go("intro") } } push.error = function(e){ diff --git a/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js b/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js index 671d36b3..7c73d66f 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js @@ -5,6 +5,7 @@ var CollectionView = ScrollableView.extend({ template: $("#collection .template").html(), loaded: false, data: null, + filtered_items: null, items: {}, events: { @@ -22,7 +23,8 @@ var CollectionView = ScrollableView.extend({ this.$content = this.$(".content") this.$loader = this.$(".loader") this.scroller = new IScroll('#collection', app.iscroll_options) - this.filterView = new DepartmentFilter ({ parent: this }) + this.departmentFilterView = new DepartmentFilter ({ parent: this }) + this.sizeFilterView = new SizeFilter ({ parent: this }) }, show: function(){ @@ -34,11 +36,24 @@ var CollectionView = ScrollableView.extend({ if (sdk.env !== "test" && app.closed.storeIsClosed) { return app.closed.show() } + +// if (sdk.env === 'test' && this.data.SearchResponseFull.Results.Items.length < 4) { +// var items = this.data.SearchResponseFull.Results.Items +// items = items.concat(items).concat(items).concat(items) +// items = items.concat(items).concat(items).concat(items) +// this.data.SearchResponseFull.Results.Items = items +// } + if (this.data && this.data.SearchResponseFull.Results.Items.length < 4) { app.footer.hide() } - else { - app.footer.show("FILTER") + if (app.store.FilterBy !== "none") { + if (app.store.FilterBy === "category") { + app.footer.show("FILTER") + } + else { + app.footer.show("FILTER BY " + app.store.FilterBy.toUpperCase()) + } } document.body.className = "collection" if (this.loaded) { @@ -50,8 +65,16 @@ var CollectionView = ScrollableView.extend({ } }, + // called when footer is tapped - filter by (x) save: function(){ - this.filterView.filter() + switch (app.store.FilterBy) { + case 'none': + this.departmentFilterView.filter() + break + case 'size': + this.sizeFilterView.filter() + break + } }, fetch: function(){ @@ -82,7 +105,7 @@ var CollectionView = ScrollableView.extend({ console.log("populate 2") this.data = data this.loaded = false - console.log(data) + // console.log(data) } console.log(">>>>>>>> YES ") if (! this.loaded) { @@ -112,26 +135,75 @@ var CollectionView = ScrollableView.extend({ // } console.log( data.SearchResponseFull.Results.Items.length ) - data.SearchResponseFull.Results.Items.forEach(function(item){ - console.log(">>> ITEM") - this.append(item, is_single_product) - }.bind(this)) - this.deferScrollToTop() + + var items = this.filtered_items || data.SearchResponseFull.Results.Items + if (app.store.GroupBy === 'size') { + this.groupBySize( items, is_single_product ) + } + else { + this.appendItems( items, is_single_product ) + } + // this.restoreScroll() + // this.deferScrollToTop() } this.afterFetchCallback && this.afterFetchCallback() - app.collection.deferRefresh() + this.deferRefresh() + this.restoreScroll() + }, + + groupBySize: function(items, is_single_product){ + var groups = {} + items.forEach(function(item){ + if (! item.Sizes.length) return + var size = item.Sizes[0] + var id = size['Text'] + if ( ! (id in groups) ) { + groups[id] = { + label: SIZE_LOOKUP[ id ], + items: [], + } + } + groups[id].items.push( item ) + }.bind(this)) + + Object.keys(groups).sort(function(a,b){ + var ao = SIZE_ORDER.indexOf( a ) + var bo = SIZE_ORDER.indexOf( b ) + return ao - bo + }).forEach(function(id){ + var size = groups[id] + var $el = $("<div>") + $el.addClass("product-group") + $el.html( size.label ) + this.$content.append($el) + this.appendItems( size.items, is_single_product ) + }.bind(this)) + }, + + appendItems: function(items, is_single_product){ + items.forEach(function(item){ + this.append(item, is_single_product) + }.bind(this)) }, append: function(item, is_single_product){ this.items[ item['Code8'] ] = item var t = this.template.replace(/{{image}}/, sdk.image(item['DefaultCode10'], is_single_product ? '13_f' : '11_f')) .replace(/{{code8}}/, item['Code8']) - this.$content.append(t) + var $t = $(t) + if (app.store.ShowProductNameOnCollectionPage) { + var $title = $("<span>") + $title.addClass("product-title") + $title.html( item['ModelNames'] ) + $t.append($title) + } + this.$content.append($t) }, pick: function(e){ var code = $(e.currentTarget).data("code") var data = this.items[code] + this.saveScroll() app.product.load(code, data) }, @@ -141,8 +213,11 @@ var CollectionView = ScrollableView.extend({ this.$title.html(this.collectionName) }, + // filter by department showDepartmentSelector: function(){ - this.filterView.filter() + if (this.$("h1").hasClass("single-dept")) { + this.departmentFilterView.filter() + } }, firstTouch: { x: 0, y: 0, id: "" }, diff --git a/StoneIsland/platforms/android/assets/www/js/lib/products/ProductView.js b/StoneIsland/platforms/android/assets/www/js/lib/products/ProductView.js index 81ad536d..2743946a 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/products/ProductView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/products/ProductView.js @@ -16,7 +16,7 @@ var ProductView = ScrollableView.extend({ this.gallery = new GalleryView () this.scroller = new IScroll('#product', app.iscroll_options) - this.$num = this.$(".num") + this.$productHeader = this.$(".product-header") this.$title = this.$(".title") this.$type = this.$(".type") this.$price = this.$(".price") @@ -113,12 +113,12 @@ var ProductView = ScrollableView.extend({ var descriptions = this.get_descriptions(details) - var name_partz = data['ModelNames'].split(' ') - var num = name_partz.shift() - var title = name_partz.join(' ') + var title = data['ModelNames'] var type = title_case( data['MicroCategory'] ) var price = "$" + data['DiscountedPrice'] + ".00" - var body = descriptions['Details'] + " " + descriptions['EditorialDescription'] + var details_description = descriptions['Details'] || "" + var editorial = descriptions['EditorialDescription'] || "" + var body = details_description + " " + editorial // body = body.replace(/<br>/g, "<br><br>").replace(/(<br>)+$/, "") var default_color_id = this.populate_selectors(data, details) @@ -162,11 +162,14 @@ var ProductView = ScrollableView.extend({ console.log( data['DefaultCode10'] ) - this.$num.html(num) this.$title.html(title) this.$type.html(type) this.$price.html(price) this.$body.html(body) + + window.FirebasePlugin && window.FirebasePlugin.setScreenName('product:' + code) + + this.$productHeader.toggleClass("wide", title.length > 48) var fits_large = !! this.fitLargeCodes[this.code] app.product.$fit.toggle( fits_large ) @@ -196,8 +199,11 @@ var ProductView = ScrollableView.extend({ populate_selectors: function(data, details){ var sizes = {}, colors = {}, size_lookup = {}, default_color - console.log(details['Item']['ModelColors'].length) - if (! details['Item']['ModelColors'].length) { + + var modelColors = details['Item']['ModelColors'] || [] + console.log('colors:', modelColors.length || "none") + + if (! modelColors.length) { this.not_available = true return } @@ -205,7 +211,7 @@ var ProductView = ScrollableView.extend({ this.not_available = false } - details['Item']['ModelColors'].forEach(function(color, index){ + modelColors.forEach(function(color, index){ if (! default_color || color['Code10'] == data['DefaultCode10']) { default_color = color['ColorId'] } @@ -218,10 +224,21 @@ var ProductView = ScrollableView.extend({ }) details['Item']['ModelSizes'].forEach(function(size){ - var label = SIZE_LOOKUP[ size['Default']['Text'] ] - if (! label && ! size['Default']['Labeled']) { + var label = "" + if (details['Item']['SizeTypeId'] == 412) { // shoes label = size['Default']['Text'] + " " + size['Default']['ClassFamily'] + console.log("shoes?", label) } + else { // everything else + label = SIZE_LOOKUP[ size['Default']['Text'] ] + } + if (! label) { + label = size['Default']['Text'] + if (size['Default']['Labeled']) { + label += " " + size['Default']['ClassFamily'] + } + } + console.log(size) size_lookup[ label ] = size['SizeId'] console.log( label ) sizes[ size['SizeId'] ] = { diff --git a/StoneIsland/platforms/android/assets/www/js/lib/products/filters/DepartmentFilter.js b/StoneIsland/platforms/android/assets/www/js/lib/products/filters/DepartmentFilter.js index cc0d925e..7d5ccf3d 100644 --- a/StoneIsland/platforms/android/assets/www/js/lib/products/filters/DepartmentFilter.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/products/filters/DepartmentFilter.js @@ -6,7 +6,6 @@ var DepartmentFilter = View.extend({ filter: function(){ var deps = app.departments.map(function(dep){ - console.log(dep) return { id: dep.uri, label: dep.text, diff --git a/StoneIsland/platforms/android/assets/www/js/lib/products/filters/SizeFilter.js b/StoneIsland/platforms/android/assets/www/js/lib/products/filters/SizeFilter.js new file mode 100644 index 00000000..d0231021 --- /dev/null +++ b/StoneIsland/platforms/android/assets/www/js/lib/products/filters/SizeFilter.js @@ -0,0 +1,60 @@ +var SizeFilter = View.extend({ + + initialize: function(opt){ + this.parent = opt.parent + }, + + filter: function(){ + var seen_sizes = {} + var sizes = [] + this.parent.data.SearchResponseFull.Results.Items.forEach(function(item){ + item.Sizes.forEach(function(size){ + if (size.Id in seen_sizes) { + return + } + seen_sizes[size.Id] = true + sizes.push(size) + }) + }) + sizes.sort(function(a,b){ + return a.Id - b.Id + }) + + var cats = sizes.map(function(cat){ + return { + id: cat.Id, + label: cat.Text, + } + }) + if (this.last_choice) { + cats.push({ + id: "__remove_filter", + label: "REMOVE FILTER", + }) + } + app.selector.select("wide", cats, this.pick.bind(this)) + }, + + last_choice: null, + + pick: function(choice){ + this.parent.$content.empty() + if (choice.id == "__remove_filter") { + this.last_choice = null + this.parent.filtered_items = null + this.parent.data.SearchResponseFull.Results.Items.forEach(this.parent.append.bind(this.parent)) + } + else { + this.last_choice = choice + console.log("filtering for size", choice.id) + var items = this.parent.data.SearchResponseFull.Results.Items.filter(function(item){ + console.log(item.Sizes.map(function(s){ return s })) + return item.Sizes.some(function(size){ return size.Id == choice.id }) + }) + this.parent.filtered_items = items + items.forEach(this.parent.append.bind(this.parent)) + } + this.parent.deferScrollToTop() + }, + +}) diff --git a/StoneIsland/platforms/android/assets/www/js/lib/view/Scrollable.js b/StoneIsland/platforms/android/assets/www/js/lib/view/Scrollable.js index 0baff845..7f90929a 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/view/Scrollable.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/view/Scrollable.js @@ -5,9 +5,26 @@ var ScrollableView = View.extend({ }, deferScrollToTop: function(){ + this.scrollPosition = 0 setTimeout(this.scrollToTop.bind(this), 0) }, + scrollPosition: 0, + + resetScroll: function(){ + this.scrollPosition = 0 + }, + + saveScroll: function(){ + this.scrollPosition = this.scroller.y + }, + + restoreScroll: function(){ + setTimeout(function(){ + this.scroller.scrollTo(0, this.scrollPosition) + }.bind(this), 0) + }, + refreshScroller: function(){ this.scroller.refresh() clearTimeout( this.scrollerRefreshTimeout ) diff --git a/StoneIsland/platforms/android/assets/www/js/sdk/_sdk.js b/StoneIsland/platforms/android/assets/www/js/sdk/_sdk.js index 017df015..c251e364 100755 --- a/StoneIsland/platforms/android/assets/www/js/sdk/_sdk.js +++ b/StoneIsland/platforms/android/assets/www/js/sdk/_sdk.js @@ -9,7 +9,7 @@ var sdk = (function(){ sdk.init = function(opt){ switch (sdk.env = opt.env || "development") { case 'test': - endpoint = "http://lvh.me:9090/" + endpoint = window.location.origin + "/" break default: case 'development': @@ -26,7 +26,12 @@ var sdk = (function(){ } sdk.image = function(code, size){ - return "http://cdn.yoox.biz/" + code.substr(0,2) + "/" + code + "_" + size + ".jpg" + return "https://cdn.yoox.biz/" + code.substr(0,2) + "/" + code + "_" + size + ".jpg" + } + + sdk.cms = function(){ + return "http://staging.stone.giraffe.life" + // return "https://stone.giraffe.life" } $.ajaxSetup({ diff --git a/StoneIsland/platforms/android/assets/www/js/sdk/auth.js b/StoneIsland/platforms/android/assets/www/js/sdk/auth.js index fa8dd71c..bcfb2d3a 100755 --- a/StoneIsland/platforms/android/assets/www/js/sdk/auth.js +++ b/StoneIsland/platforms/android/assets/www/js/sdk/auth.js @@ -51,6 +51,9 @@ var auth = sdk.auth = (function(){ localStorage.setItem("yoox.access_token", access_token) localStorage.setItem("yoox.user_id", user_id) + + window.FirebasePlugin && window.FirebasePlugin.setUserId(user_id) + cb && cb() } auth.get_user = function(cb){ @@ -63,6 +66,7 @@ var auth = sdk.auth = (function(){ auth.user_id = -1 localStorage.removeItem("yoox.access_token") localStorage.removeItem("yoox.user_id") + cb && cb() } diff --git a/StoneIsland/platforms/android/assets/www/js/vendor/loader.js b/StoneIsland/platforms/android/assets/www/js/vendor/loader.js index cc9644f8..ccfcdc9e 100755 --- a/StoneIsland/platforms/android/assets/www/js/vendor/loader.js +++ b/StoneIsland/platforms/android/assets/www/js/vendor/loader.js @@ -62,25 +62,28 @@ var Loader = Loader || (function(){ } // Preload the images in config.images - Loader.prototype.preloadImages = function(images){ + Loader.prototype.preloadImages = function(images, register){ this.register("preload"); for (var i = 0; i < images.length; i++) { - this.preloadImage(images[i]); + this.preloadImage(images[i], register); } this.ready("preload"); } Loader.prototype.preloadImage = function(src, register, cb){ if (! src || src == "none") return; var _this = this; - if (! cb && typeof register !== "string") { + if (! cb && typeof register !== "boolean") { cb = register register = null } if (register) { this.register(src); } - var img = new Image(); + var img = new Image() + var loaded = false img.onload = function(){ + if (loaded) return + loaded = true if (cb) { cb(img); } diff --git a/StoneIsland/platforms/android/assets/www/plugins/cordova-plugin-firebase/www/firebase.js b/StoneIsland/platforms/android/assets/www/plugins/cordova-plugin-firebase/www/firebase.js deleted file mode 100644 index e1e423d1..00000000 --- a/StoneIsland/platforms/android/assets/www/plugins/cordova-plugin-firebase/www/firebase.js +++ /dev/null @@ -1,124 +0,0 @@ -cordova.define("cordova-plugin-firebase.FirebasePlugin", function(require, exports, module) { -var exec = require('cordova/exec'); - -exports.getInstanceId = function(success, error) { - exec(success, error, "FirebasePlugin", "getInstanceId", []); -}; - -exports.getToken = function(success, error) { - exec(success, error, "FirebasePlugin", "getToken", []); -}; - -exports.onNotificationOpen = function(success, error) { - exec(success, error, "FirebasePlugin", "onNotificationOpen", []); -}; - -exports.onTokenRefresh = function(success, error) { - exec(success, error, "FirebasePlugin", "onTokenRefresh", []); -}; - -exports.grantPermission = function(success, error) { - exec(success, error, "FirebasePlugin", "grantPermission", []); -}; - -exports.hasPermission = function(success, error) { - exec(success, error, "FirebasePlugin", "hasPermission", []); -}; - -exports.setBadgeNumber = function(number, success, error) { - exec(success, error, "FirebasePlugin", "setBadgeNumber", [number]); -}; - -exports.getBadgeNumber = function(success, error) { - exec(success, error, "FirebasePlugin", "getBadgeNumber", []); -}; - -exports.subscribe = function(topic, success, error) { - exec(success, error, "FirebasePlugin", "subscribe", [topic]); -}; - -exports.unsubscribe = function(topic, success, error) { - exec(success, error, "FirebasePlugin", "unsubscribe", [topic]); -}; - -exports.unregister = function(success, error) { - exec(success, error, "FirebasePlugin", "unregister", []); -}; - -exports.logEvent = function(name, params, success, error) { - exec(success, error, "FirebasePlugin", "logEvent", [name, params]); -}; - -exports.logError = function(message, success, error) { - exec(success, error, "FirebasePlugin", "logError", [message]); -}; - -exports.setScreenName = function(name, success, error) { - exec(success, error, "FirebasePlugin", "setScreenName", [name]); -}; - -exports.setUserId = function(id, success, error) { - exec(success, error, "FirebasePlugin", "setUserId", [id]); -}; - -exports.setUserProperty = function(name, value, success, error) { - exec(success, error, "FirebasePlugin", "setUserProperty", [name, value]); -}; - -exports.activateFetched = function (success, error) { - exec(success, error, "FirebasePlugin", "activateFetched", []); -}; - -exports.fetch = function (cacheExpirationSeconds, success, error) { - var args = []; - if (typeof cacheExpirationSeconds === 'number') { - args.push(cacheExpirationSeconds); - } else { - error = success; - success = cacheExpirationSeconds; - } - exec(success, error, "FirebasePlugin", "fetch", args); -}; - -exports.getByteArray = function (key, namespace, success, error) { - var args = [key]; - if (typeof namespace === 'string') { - args.push(namespace); - } else { - error = success; - success = namespace; - } - exec(success, error, "FirebasePlugin", "getByteArray", args); -}; - -exports.getValue = function (key, namespace, success, error) { - var args = [key]; - if (typeof namespace === 'string') { - args.push(namespace); - } else { - error = success; - success = namespace; - } - exec(success, error, "FirebasePlugin", "getValue", args); -}; - -exports.getInfo = function (success, error) { - exec(success, error, "FirebasePlugin", "getInfo", []); -}; - -exports.setConfigSettings = function (settings, success, error) { - exec(success, error, "FirebasePlugin", "setConfigSettings", [settings]); -}; - -exports.setDefaults = function (defaults, namespace, success, error) { - var args = [defaults]; - if (typeof namespace === 'string') { - args.push(namespace); - } else { - error = success; - success = namespace; - } - exec(success, error, "FirebasePlugin", "setDefaults", args); -}; - -}); diff --git a/StoneIsland/platforms/android/assets/www/plugins/phonegap-plugin-push/www/push.js b/StoneIsland/platforms/android/assets/www/plugins/phonegap-plugin-push/www/push.js index a5315486..7234d474 100644 --- a/StoneIsland/platforms/android/assets/www/plugins/phonegap-plugin-push/www/push.js +++ b/StoneIsland/platforms/android/assets/www/plugins/phonegap-plugin-push/www/push.js @@ -1,4 +1,16 @@ cordova.define("phonegap-plugin-push.PushNotification", function(require, exports, module) { +/** +* This file has been generated by Babel. +* +* DO NOT EDIT IT DIRECTLY +* +* Edit the JS source file src/js/push.js +**/'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + /* global cordova:false */ /* globals window */ @@ -8,322 +20,358 @@ cordova.define("phonegap-plugin-push.PushNotification", function(require, export var exec = cordova.require('cordova/exec'); -/** - * PushNotification constructor. - * - * @param {Object} options to initiate Push Notifications. - * @return {PushNotification} instance that can be monitored and cancelled. - */ +var PushNotification = function () { + /** + * PushNotification constructor. + * + * @param {Object} options to initiate Push Notifications. + * @return {PushNotification} instance that can be monitored and cancelled. + */ + function PushNotification(options) { + var _this = this; + + _classCallCheck(this, PushNotification); -var PushNotification = function(options) { - this._handlers = { - 'registration': [], - 'notification': [], - 'error': [] + this.handlers = { + registration: [], + notification: [], + error: [] }; // require options parameter if (typeof options === 'undefined') { - throw new Error('The options argument is required.'); + throw new Error('The options argument is required.'); } // store the options to this object instance this.options = options; // triggered on registration and notification - var that = this; - var success = function(result) { - if (result && typeof result.registrationId !== 'undefined') { - that.emit('registration', result); - } else if (result && result.additionalData && typeof result.additionalData.actionCallback !== 'undefined') { - var executeFuctionOrEmitEventByName = function(callbackName, context, arg) { - var namespaces = callbackName.split('.'); - var func = namespaces.pop(); - for (var i = 0; i < namespaces.length; i++) { - context = context[namespaces[i]]; - } + var success = function success(result) { + if (result && typeof result.registrationId !== 'undefined') { + _this.emit('registration', result); + } else if (result && result.additionalData && typeof result.additionalData.actionCallback !== 'undefined') { + var executeFuctionOrEmitEventByName = function executeFuctionOrEmitEventByName(functionName, context) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } - if (typeof context[func] === 'function') { - context[func].call(context, arg); - } else { - that.emit(callbackName, arg); - } - }; + var namespaces = functionName.split('.'); + var func = namespaces.pop(); + for (var i = 0; i < namespaces.length; i++) { + context = context[namespaces[i]]; + } - executeFuctionOrEmitEventByName(result.additionalData.actionCallback, window, result); - } else if (result) { - that.emit('notification', result); - } + if (typeof context[func] === 'function') { + context[func].call(context, args); + } else { + _this.emit(functionName, args); + } + }; + + executeFuctionOrEmitEventByName(result.additionalData.actionCallback, window, result); + } else if (result) { + _this.emit('notification', result); + } }; // triggered on error - var fail = function(msg) { - var e = (typeof msg === 'string') ? new Error(msg) : msg; - that.emit('error', e); + var fail = function fail(msg) { + var e = typeof msg === 'string' ? new Error(msg) : msg; + _this.emit('error', e); }; // wait at least one process tick to allow event subscriptions - setTimeout(function() { - exec(success, fail, 'PushNotification', 'init', [options]); + setTimeout(function () { + exec(success, fail, 'PushNotification', 'init', [options]); }, 10); -}; + } + + /** + * Unregister from push notifications + */ -/** - * Unregister from push notifications - */ -PushNotification.prototype.unregister = function(successCallback, errorCallback, options) { - if (!errorCallback) { errorCallback = function() {}; } + _createClass(PushNotification, [{ + key: 'unregister', + value: function unregister(successCallback) { + var _this2 = this; - if (typeof errorCallback !== 'function') { + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; + var options = arguments[2]; + + if (typeof errorCallback !== 'function') { console.log('PushNotification.unregister failure: failure parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.unregister failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.unregister failure: success callback parameter ' + ' must be a function'); return; - } + } - var that = this; - var cleanHandlersAndPassThrough = function() { + var cleanHandlersAndPassThrough = function cleanHandlersAndPassThrough() { if (!options) { - that._handlers = { - 'registration': [], - 'notification': [], - 'error': [] - }; + _this2.handlers = { + registration: [], + notification: [], + error: [] + }; } successCallback(); - }; + }; - exec(cleanHandlersAndPassThrough, errorCallback, 'PushNotification', 'unregister', [options]); -}; + exec(cleanHandlersAndPassThrough, errorCallback, 'PushNotification', 'unregister', [options]); + } -/** - * subscribe to a topic - * @param {String} topic topic to subscribe - * @param {Function} successCallback success callback - * @param {Function} errorCallback error callback - * @return {void} - */ -PushNotification.prototype.subscribe = function(topic, successCallback, errorCallback) { - if (!errorCallback) { errorCallback = function() {}; } + /** + * subscribe to a topic + * @param {String} topic topic to subscribe + * @param {Function} successCallback success callback + * @param {Function} errorCallback error callback + * @return {void} + */ + + }, { + key: 'subscribe', + value: function subscribe(topic, successCallback) { + var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {}; - if (typeof errorCallback !== 'function') { - console.log('PushNotification.subscribe failure: failure parameter not a function'); + if (typeof errorCallback !== 'function') { + console.log('PushNotification.subscribe failure: ' + 'failure parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.subscribe failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.subscribe failure: ' + 'success callback parameter must be a function'); return; + } + + exec(successCallback, errorCallback, 'PushNotification', 'subscribe', [topic]); } - exec(successCallback, errorCallback, 'PushNotification', 'subscribe', [topic]); -}; + /** + * unsubscribe to a topic + * @param {String} topic topic to unsubscribe + * @param {Function} successCallback success callback + * @param {Function} errorCallback error callback + * @return {void} + */ -/** - * unsubscribe to a topic - * @param {String} topic topic to unsubscribe - * @param {Function} successCallback success callback - * @param {Function} errorCallback error callback - * @return {void} - */ -PushNotification.prototype.unsubscribe = function(topic, successCallback, errorCallback) { - if (!errorCallback) { errorCallback = function() {}; } + }, { + key: 'unsubscribe', + value: function unsubscribe(topic, successCallback) { + var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {}; - if (typeof errorCallback !== 'function') { + if (typeof errorCallback !== 'function') { console.log('PushNotification.unsubscribe failure: failure parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.unsubscribe failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.unsubscribe failure: ' + 'success callback parameter must be a function'); return; - } + } - exec(successCallback, errorCallback, 'PushNotification', 'unsubscribe', [topic]); -}; + exec(successCallback, errorCallback, 'PushNotification', 'unsubscribe', [topic]); + } -/** - * Call this to set the application icon badge - */ + /** + * Call this to set the application icon badge + */ -PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallback, errorCallback, badge) { - if (!errorCallback) { errorCallback = function() {}; } + }, { + key: 'setApplicationIconBadgeNumber', + value: function setApplicationIconBadgeNumber(successCallback) { + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; + var badge = arguments[2]; - if (typeof errorCallback !== 'function') { - console.log('PushNotification.setApplicationIconBadgeNumber failure: failure parameter not a function'); + if (typeof errorCallback !== 'function') { + console.log('PushNotification.setApplicationIconBadgeNumber failure: failure ' + 'parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.setApplicationIconBadgeNumber failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.setApplicationIconBadgeNumber failure: success ' + 'callback parameter must be a function'); return; - } + } - exec(successCallback, errorCallback, 'PushNotification', 'setApplicationIconBadgeNumber', [{badge: badge}]); -}; + exec(successCallback, errorCallback, 'PushNotification', 'setApplicationIconBadgeNumber', [{ badge: badge }]); + } -/** - * Get the application icon badge - */ + /** + * Get the application icon badge + */ -PushNotification.prototype.getApplicationIconBadgeNumber = function(successCallback, errorCallback) { - if (!errorCallback) { errorCallback = function() {}; } + }, { + key: 'getApplicationIconBadgeNumber', + value: function getApplicationIconBadgeNumber(successCallback) { + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; - if (typeof errorCallback !== 'function') { - console.log('PushNotification.getApplicationIconBadgeNumber failure: failure parameter not a function'); + if (typeof errorCallback !== 'function') { + console.log('PushNotification.getApplicationIconBadgeNumber failure: failure ' + 'parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.getApplicationIconBadgeNumber failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.getApplicationIconBadgeNumber failure: success ' + 'callback parameter must be a function'); return; - } + } - exec(successCallback, errorCallback, 'PushNotification', 'getApplicationIconBadgeNumber', []); -}; + exec(successCallback, errorCallback, 'PushNotification', 'getApplicationIconBadgeNumber', []); + } -/** - * Get the application icon badge - */ + /** + * Clear all notifications + */ -PushNotification.prototype.clearAllNotifications = function(successCallback, errorCallback) { - if (!successCallback) { successCallback = function() {}; } - if (!errorCallback) { errorCallback = function() {}; } + }, { + key: 'clearAllNotifications', + value: function clearAllNotifications() { + var successCallback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; - if (typeof errorCallback !== 'function') { - console.log('PushNotification.clearAllNotifications failure: failure parameter not a function'); + if (typeof errorCallback !== 'function') { + console.log('PushNotification.clearAllNotifications failure: failure parameter ' + 'not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.clearAllNotifications failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.clearAllNotifications failure: success callback ' + 'parameter must be a function'); return; - } + } - exec(successCallback, errorCallback, 'PushNotification', 'clearAllNotifications', []); -}; - -/** - * Listen for an event. - * - * Any event is supported, but the following are built-in: - * - * - registration - * - notification - * - error - * - * @param {String} eventName to subscribe to. - * @param {Function} callback triggered on the event. - */ + exec(successCallback, errorCallback, 'PushNotification', 'clearAllNotifications', []); + } + /** + * Listen for an event. + * + * The following events are supported: + * + * - registration + * - notification + * - error + * + * @param {String} eventName to subscribe to. + * @param {Function} callback triggered on the event. + */ -PushNotification.prototype.on = function(eventName, callback) { - if (!this._handlers.hasOwnProperty(eventName)) { - this._handlers[eventName] = []; + }, { + key: 'on', + value: function on(eventName, callback) { + if (!this.handlers.hasOwnProperty(eventName)) { + this.handlers[eventName] = []; + } + this.handlers[eventName].push(callback); } - this._handlers[eventName].push(callback); -}; -/** - * Remove event listener. - * - * @param {String} eventName to match subscription. - * @param {Function} handle function associated with event. - */ + /** + * Remove event listener. + * + * @param {String} eventName to match subscription. + * @param {Function} handle function associated with event. + */ -PushNotification.prototype.off = function (eventName, handle) { - if (this._handlers.hasOwnProperty(eventName)) { - var handleIndex = this._handlers[eventName].indexOf(handle); + }, { + key: 'off', + value: function off(eventName, handle) { + if (this.handlers.hasOwnProperty(eventName)) { + var handleIndex = this.handlers[eventName].indexOf(handle); if (handleIndex >= 0) { - this._handlers[eventName].splice(handleIndex, 1); + this.handlers[eventName].splice(handleIndex, 1); } + } } -}; -/** - * Emit an event. - * - * This is intended for internal use only. - * - * @param {String} eventName is the event to trigger. - * @param {*} all arguments are passed to the event listeners. - * - * @return {Boolean} is true when the event is triggered otherwise false. - */ + /** + * Emit an event. + * + * This is intended for internal use only. + * + * @param {String} eventName is the event to trigger. + * @param {*} all arguments are passed to the event listeners. + * + * @return {Boolean} is true when the event is triggered otherwise false. + */ -PushNotification.prototype.emit = function() { - var args = Array.prototype.slice.call(arguments); - var eventName = args.shift(); + }, { + key: 'emit', + value: function emit() { + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } - if (!this._handlers.hasOwnProperty(eventName)) { + var eventName = args.shift(); + + if (!this.handlers.hasOwnProperty(eventName)) { return false; - } + } - for (var i = 0, length = this._handlers[eventName].length; i < length; i++) { - var callback = this._handlers[eventName][i]; + for (var i = 0, length = this.handlers[eventName].length; i < length; i++) { + var callback = this.handlers[eventName][i]; if (typeof callback === 'function') { - callback.apply(undefined,args); + callback.apply(undefined, args); } else { - console.log('event handler: ' + eventName + ' must be a function'); + console.log('event handler: ' + eventName + ' must be a function'); } - } + } - return true; -}; - -PushNotification.prototype.finish = function(successCallback, errorCallback, id) { - if (!successCallback) { successCallback = function() {}; } - if (!errorCallback) { errorCallback = function() {}; } - if (!id) { id = 'handler'; } + return true; + } + }, { + key: 'finish', + value: function finish() { + var successCallback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; + var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'handler'; - if (typeof successCallback !== 'function') { + if (typeof successCallback !== 'function') { console.log('finish failure: success callback parameter must be a function'); return; - } + } - if (typeof errorCallback !== 'function') { + if (typeof errorCallback !== 'function') { console.log('finish failure: failure parameter not a function'); return; + } + + exec(successCallback, errorCallback, 'PushNotification', 'finish', [id]); } + }]); - exec(successCallback, errorCallback, 'PushNotification', 'finish', [id]); -}; + return PushNotification; +}(); /*! * Push Notification Plugin. */ module.exports = { - /** - * Register for Push Notifications. - * - * This method will instantiate a new copy of the PushNotification object - * and start the registration process. - * - * @param {Object} options - * @return {PushNotification} instance - */ - - init: function(options) { - return new PushNotification(options); - }, + /** + * Register for Push Notifications. + * + * This method will instantiate a new copy of the PushNotification object + * and start the registration process. + * + * @param {Object} options + * @return {PushNotification} instance + */ - hasPermission: function(successCallback, errorCallback) { - exec(successCallback, errorCallback, 'PushNotification', 'hasPermission', []); - }, + init: function init(options) { + return new PushNotification(options); + }, - /** - * PushNotification Object. - * - * Expose the PushNotification object for direct use - * and testing. Typically, you should use the - * .init helper method. - */ + hasPermission: function hasPermission(successCallback, errorCallback) { + exec(successCallback, errorCallback, 'PushNotification', 'hasPermission', []); + }, - PushNotification: PushNotification + /** + * PushNotification Object. + * + * Expose the PushNotification object for direct use + * and testing. Typically, you should use the + * .init helper method. + */ + PushNotification: PushNotification }; - }); diff --git a/StoneIsland/platforms/android/build.gradle b/StoneIsland/platforms/android/build.gradle index c4752d60..dde2c8c1 100644 --- a/StoneIsland/platforms/android/build.gradle +++ b/StoneIsland/platforms/android/build.gradle @@ -30,8 +30,6 @@ buildscript { // http://tools.android.com/tech-docs/new-build-system/version-compatibility // and https://issues.apache.org/jira/browse/CB-8143 dependencies { - classpath "com.google.gms:google-services:3.0.0" - classpath "com.google.gms:google-services:3.0.0" classpath 'com.android.tools.build:gradle:2.2.3' } } @@ -91,7 +89,6 @@ ext { // PLUGIN GRADLE EXTENSIONS START apply from: "phonegap-plugin-push/stoneisland-push.gradle" -apply from: "cordova-plugin-firebase/stoneisland-build.gradle" // PLUGIN GRADLE EXTENSIONS END def hasBuildExtras = file('build-extras.gradle').exists() @@ -253,14 +250,9 @@ dependencies { // SUB-PROJECT DEPENDENCIES START debugCompile(project(path: "CordovaLib", configuration: "debug")) releaseCompile(project(path: "CordovaLib", configuration: "release")) - compile "com.android.support:support-v13:23+" - compile "com.google.android.gms:play-services-gcm:9.8+" - compile "me.leolin:ShortcutBadger:1.1.11@aar" - compile "com.google.gms:google-services:+" - compile "com.google.firebase:firebase-core:+" - compile "com.google.firebase:firebase-messaging:+" - compile "com.google.firebase:firebase-crash:+" - compile "com.google.firebase:firebase-config:+" + compile "com.android.support:support-v13:25.1.0" + compile "me.leolin:ShortcutBadger:1.1.17@aar" + compile "com.google.firebase:firebase-messaging:11.0.1" // SUB-PROJECT DEPENDENCIES END } diff --git a/StoneIsland/platforms/android/cordova-plugin-firebase/stoneisland-build.gradle b/StoneIsland/platforms/android/cordova-plugin-firebase/stoneisland-build.gradle deleted file mode 100755 index d5cb4edd..00000000 --- a/StoneIsland/platforms/android/cordova-plugin-firebase/stoneisland-build.gradle +++ /dev/null @@ -1,15 +0,0 @@ -buildscript {
- repositories {
- mavenCentral()
- }
- dependencies {
- classpath 'com.google.gms:google-services:3.0.0'
- }
-}
-repositories {
- mavenCentral()
-}
-dependencies {
- compile 'me.leolin:ShortcutBadger:1.1.4@aar'
- compile 'com.google.firebase:firebase-crash:+'
-}
diff --git a/StoneIsland/platforms/android/cordova/android_sdk_version b/StoneIsland/platforms/android/cordova/android_sdk_version index 547f41bd..34ed28fe 100755 --- a/StoneIsland/platforms/android/cordova/android_sdk_version +++ b/StoneIsland/platforms/android/cordova/android_sdk_version @@ -19,10 +19,10 @@ under the License. */ -var android_sdk_version = require('./lib/android_sdk_version'); +var android_sdk = require('./lib/android_sdk'); -android_sdk_version.run().done(null, function(err) { - console.log(err); +android_sdk.print_newest_available_sdk_target().done(null, function(err) { + console.error(err); process.exit(2); }); diff --git a/StoneIsland/platforms/android/cordova/android_sdk_version.bat b/StoneIsland/platforms/android/cordova/android_sdk_version.bat new file mode 100644 index 00000000..33a1fa25 --- /dev/null +++ b/StoneIsland/platforms/android/cordova/android_sdk_version.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0android_sdk_version" +IF EXIST %script_path% ( + node "%script_path%" %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'android_sdk_version' script in 'bin' folder, aborting...>&2 + EXIT /B 1 +) diff --git a/StoneIsland/platforms/android/cordova/lib/android_sdk.js b/StoneIsland/platforms/android/cordova/lib/android_sdk.js new file mode 100755 index 00000000..a1a806a6 --- /dev/null +++ b/StoneIsland/platforms/android/cordova/lib/android_sdk.js @@ -0,0 +1,106 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), + superspawn = require('cordova-common').superspawn; + +var suffix_number_regex = /(\d+)$/; +// Used for sorting Android targets, example strings to sort: +// android-19 +// android-L +// Google Inc.:Google APIs:20 +// Google Inc.:Glass Development Kit Preview:20 +// The idea is to sort based on largest "suffix" number - meaning the bigger +// the number at the end, the more recent the target, the closer to the +// start of the array. +function sort_by_largest_numerical_suffix(a, b) { + var suffix_a = a.match(suffix_number_regex); + var suffix_b = b.match(suffix_number_regex); + if (suffix_a && suffix_b) { + // If the two targets being compared have suffixes, return less than + // zero, or greater than zero, based on which suffix is larger. + return (parseInt(suffix_a[1]) > parseInt(suffix_b[1]) ? -1 : 1); + } else { + // If no suffix numbers were detected, leave the order as-is between + // elements a and b. + return 0; + } +} + +module.exports.print_newest_available_sdk_target = function() { + return module.exports.list_targets() + .then(function(targets) { + targets.sort(sort_by_largest_numerical_suffix); + console.log(targets[0]); + }); +}; + +module.exports.version_string_to_api_level = { + '4.0': 14, + '4.0.3': 15, + '4.1': 16, + '4.2': 17, + '4.3': 18, + '4.4': 19, + '4.4W': 20, + '5.0': 21, + '5.1': 22, + '6.0': 23, + '7.0': 24, + '7.1.1': 25 +}; + +function parse_targets(output) { + var target_out = output.split('\n'); + var targets = []; + for (var i = target_out.length - 1; i >= 0; i--) { + if(target_out[i].match(/id:/)) { // if "id:" is in the line... + targets.push(target_out[i].match(/"(.+)"/)[1]); //.. match whatever is in quotes. + } + } + return targets; +} + +module.exports.list_targets_with_android = function() { + return superspawn.spawn('android', ['list', 'target']) + .then(parse_targets); +}; + +module.exports.list_targets_with_avdmanager = function() { + return superspawn.spawn('avdmanager', ['list', 'target']) + .then(parse_targets); +}; + +module.exports.list_targets = function() { + return module.exports.list_targets_with_avdmanager() + .catch(function(err) { + // If there's an error, like avdmanager could not be found, we can try + // as a last resort, to run `android`, in case this is a super old + // SDK installation. + if (err && (err.code == 'ENOENT' || (err.stderr && err.stderr.match(/not recognized/)))) { + return module.exports.list_targets_with_android(); + } else throw err; + }) + .then(function(targets) { + if (targets.length === 0) { + return Q.reject(new Error('No android targets (SDKs) installed!')); + } + return targets; + }); +}; diff --git a/StoneIsland/platforms/android/cordova/lib/android_sdk_version.js b/StoneIsland/platforms/android/cordova/lib/android_sdk_version.js deleted file mode 100755 index 79af2727..00000000 --- a/StoneIsland/platforms/android/cordova/lib/android_sdk_version.js +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env node - -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -var child_process = require('child_process'), - Q = require('q'); - -var get_highest_sdk = function(results){ - var reg = /\d+/; - var apiLevels = []; - for(var i=0;i<results.length;i++){ - apiLevels[i] = parseInt(results[i].match(reg)[0]); - } - apiLevels.sort(function(a,b){return b-a;}); - console.log(apiLevels[0]); -}; - -var get_sdks = function() { - var d = Q.defer(); - child_process.exec('android list targets', function(err, stdout, stderr) { - if (err) d.reject(stderr); - else d.resolve(stdout); - }); - - return d.promise.then(function(output) { - var reg = /android-\d+/gi; - var results = output.match(reg); - if(results.length===0){ - return Q.reject(new Error('No android sdks installed.')); - }else{ - get_highest_sdk(results); - } - - return Q(); - }, function(stderr) { - if (stderr.match(/command\snot\sfound/) || stderr.match(/'android' is not recognized/)) { - return Q.reject(new Error('The command \"android\" failed. Make sure you have the latest Android SDK installed, and the \"android\" command (inside the tools/ folder) is added to your path.')); - } else { - return Q.reject(new Error('An error occurred while listing Android targets')); - } - }); -}; - -module.exports.run = function() { - return Q.all([get_sdks()]); -}; - diff --git a/StoneIsland/platforms/android/cordova/lib/builders/GradleBuilder.js b/StoneIsland/platforms/android/cordova/lib/builders/GradleBuilder.js index f415646e..5b5ce13d 100644 --- a/StoneIsland/platforms/android/cordova/lib/builders/GradleBuilder.js +++ b/StoneIsland/platforms/android/cordova/lib/builders/GradleBuilder.js @@ -65,6 +65,21 @@ GradleBuilder.prototype.getArgs = function(cmd, opts) { return args; }; +/* + * This returns a promise + */ + +GradleBuilder.prototype.runGradleWrapper = function(gradle_cmd) { + var gradlePath = path.join(this.root, 'gradlew'); + var wrapperGradle = path.join(this.root, 'wrapper.gradle'); + if(fs.existsSync(gradlePath)) { + //Literally do nothing, for some reason this works, while !fs.existsSync didn't on Windows + } else { + return spawn(gradle_cmd, ['-p', this.root, 'wrapper', '-b', wrapperGradle], {stdio: 'inherit'}); + } +}; + + // Makes the project buildable, minus the gradle wrapper. GradleBuilder.prototype.prepBuildFiles = function() { // Update the version of build.gradle in each dependent library. @@ -159,17 +174,15 @@ GradleBuilder.prototype.prepBuildFiles = function() { GradleBuilder.prototype.prepEnv = function(opts) { var self = this; return check_reqs.check_gradle() - .then(function() { - return self.prepBuildFiles(); - }).then(function() { - // Copy the gradle wrapper on each build so that: - // A) we don't require the Android SDK at project creation time, and - // B) we always use the SDK's latest version of it. - // check_reqs ensures that this is set. - /*jshint -W069 */ - var sdkDir = process.env['ANDROID_HOME']; - /*jshint +W069 */ - var wrapperDir = path.join(sdkDir, 'tools', 'templates', 'gradle', 'wrapper'); + .then(function(gradlePath) { + return self.runGradleWrapper(gradlePath); + }).then(function() { + return self.prepBuildFiles(); + }).then(function() { + // We now copy the gradle out of the framework + // This is a dirty patch to get the build working + /* + var wrapperDir = path.join(self.root, 'CordovaLib'); if (process.platform == 'win32') { shell.rm('-f', path.join(self.root, 'gradlew.bat')); shell.cp(path.join(wrapperDir, 'gradlew.bat'), self.root); @@ -180,13 +193,13 @@ GradleBuilder.prototype.prepEnv = function(opts) { shell.rm('-rf', path.join(self.root, 'gradle', 'wrapper')); shell.mkdir('-p', path.join(self.root, 'gradle')); shell.cp('-r', path.join(wrapperDir, 'gradle', 'wrapper'), path.join(self.root, 'gradle')); - +*/ // If the gradle distribution URL is set, make sure it points to version we want. // If it's not set, do nothing, assuming that we're using a future version of gradle that we don't want to mess with. // For some reason, using ^ and $ don't work. This does the job, though. var distributionUrlRegex = /distributionUrl.*zip/; /*jshint -W069 */ - var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-2.14.1-all.zip'; + var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-3.3-all.zip'; /*jshint +W069 */ var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 'wrapper', 'gradle-wrapper.properties'); shell.chmod('u+w', gradleWrapperPropertiesPath); diff --git a/StoneIsland/platforms/android/cordova/lib/check_reqs.js b/StoneIsland/platforms/android/cordova/lib/check_reqs.js index ac6fa4c1..1fd397ad 100644 --- a/StoneIsland/platforms/android/cordova/lib/check_reqs.js +++ b/StoneIsland/platforms/android/cordova/lib/check_reqs.js @@ -26,10 +26,12 @@ var shelljs = require('shelljs'), Q = require('q'), path = require('path'), fs = require('fs'), - ROOT = path.join(__dirname, '..', '..'); + os = require('os'), + REPO_ROOT = path.join(__dirname, '..', '..', '..', '..'), + PROJECT_ROOT = path.join(__dirname, '..', '..'); var CordovaError = require('cordova-common').CordovaError; - -var isWindows = process.platform == 'win32'; +var superspawn = require('cordova-common').superspawn; +var android_sdk = require('./android_sdk'); function forgivingWhichSync(cmd) { try { @@ -50,7 +52,16 @@ function tryCommand(cmd, errMsg, catchStderr) { return d.promise; } -// Get valid target from framework/project.properties +module.exports.isWindows = function() { + return (os.platform() == 'win32'); +}; + +module.exports.isDarwin = function() { + return (os.platform() == 'darwin'); +}; + +// Get valid target from framework/project.properties if run from this repo +// Otherwise get target from project.properties file within a generated cordova-android project module.exports.get_target = function() { function extractFromFile(filePath) { var target = shelljs.grep(/\btarget=/, filePath); @@ -59,38 +70,83 @@ module.exports.get_target = function() { } return target.split('=')[1].trim(); } - if (fs.existsSync(path.join(ROOT, 'framework', 'project.properties'))) { - return extractFromFile(path.join(ROOT, 'framework', 'project.properties')); + var repo_file = path.join(REPO_ROOT, 'framework', 'project.properties'); + if (fs.existsSync(repo_file)) { + return extractFromFile(repo_file); } - if (fs.existsSync(path.join(ROOT, 'project.properties'))) { - // if no target found, we're probably in a project and project.properties is in ROOT. - return extractFromFile(path.join(ROOT, 'project.properties')); + var project_file = path.join(PROJECT_ROOT, 'project.properties'); + if (fs.existsSync(project_file)) { + // if no target found, we're probably in a project and project.properties is in PROJECT_ROOT. + return extractFromFile(project_file); } - throw new Error('Could not find android target. File missing: ' + path.join(ROOT, 'project.properties')); + throw new Error('Could not find android target in either ' + repo_file + ' nor ' + project_file); }; // Returns a promise. Called only by build and clean commands. module.exports.check_ant = function() { - return tryCommand('ant -version', 'Failed to run "ant -version", make sure you have ant installed and added to your PATH.') - .then(function (output) { + return superspawn.spawn('ant', ['-version']) + .then(function(output) { // Parse Ant version from command output return /version ((?:\d+\.)+(?:\d+))/i.exec(output)[1]; + }).catch(function(err) { + throw new CordovaError('Failed to run `ant -version`. Make sure you have `ant` on your $PATH.'); }); }; +module.exports.get_gradle_wrapper = function() { + var androidStudioPath; + var i = 0; + var foundStudio = false; + var program_dir; + if (module.exports.isDarwin()) { + program_dir = fs.readdirSync('/Applications'); + while (i < program_dir.length && !foundStudio) { + if (program_dir[i].startsWith('Android Studio')) { + //TODO: Check for a specific Android Studio version, make sure it's not Canary + androidStudioPath = path.join('/Applications', program_dir[i], 'Contents', 'gradle'); + foundStudio = true; + } else { ++i; } + } + } else if (module.exports.isWindows()) { + var androidPath = path.join(process.env['ProgramFiles'], 'Android') + '/'; + if (fs.existsSync(androidPath)) { + program_dir = fs.readdirSync(androidPath); + while (i < program_dir.length && !foundStudio) { + if (program_dir[i].startsWith('Android Studio')) { + foundStudio = true; + androidStudioPath = path.join(process.env['ProgramFiles'], 'Android', program_dir[i], 'gradle'); + } else { ++i; } + } + } + } + + if (androidStudioPath !== null && fs.existsSync(androidStudioPath)) { + var dirs = fs.readdirSync(androidStudioPath); + if(dirs[0].split('-')[0] == 'gradle') { + return path.join(androidStudioPath, dirs[0], 'bin', 'gradle'); + } + } else { + //OK, let's try to check for Gradle! + return forgivingWhichSync('gradle'); + } +}; + // Returns a promise. Called only by build and clean commands. module.exports.check_gradle = function() { var sdkDir = process.env['ANDROID_HOME']; + var d = Q.defer(); if (!sdkDir) return Q.reject(new CordovaError('Could not find gradle wrapper within Android SDK. Could not find Android SDK directory.\n' + 'Might need to install Android SDK or set up \'ANDROID_HOME\' env variable.')); - var wrapperDir = path.join(sdkDir, 'tools', 'templates', 'gradle', 'wrapper'); - if (!fs.existsSync(wrapperDir)) { - return Q.reject(new CordovaError('Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.\n' + - 'Looked here: ' + wrapperDir)); - } - return Q.when(); + var gradlePath = module.exports.get_gradle_wrapper(); + if (gradlePath.length !== 0) + d.resolve(gradlePath); + else + d.reject(new CordovaError('Could not find an installed version of Gradle either in Android Studio,\n' + + 'or on your system to install the gradle wrapper. Please include gradle \n' + + 'in your path, or install Android Studio')); + return d.promise; }; // Returns a promise. @@ -105,12 +161,15 @@ module.exports.check_java = function() { } } else { if (javacPath) { - var msg = 'Failed to find \'JAVA_HOME\' environment variable. Try setting setting it manually.'; // OS X has a command for finding JAVA_HOME. - if (fs.existsSync('/usr/libexec/java_home')) { - return tryCommand('/usr/libexec/java_home', msg) + var find_java = '/usr/libexec/java_home'; + var default_java_error_msg = 'Failed to find \'JAVA_HOME\' environment variable. Try setting setting it manually.'; + if (fs.existsSync(find_java)) { + return superspawn.spawn(find_java) .then(function(stdout) { process.env['JAVA_HOME'] = stdout.trim(); + }).catch(function(err) { + throw new CordovaError(default_java_error_msg); }); } else { // See if we can derive it from javac's location. @@ -119,10 +178,10 @@ module.exports.check_java = function() { if (fs.existsSync(path.join(maybeJavaHome, 'lib', 'tools.jar'))) { process.env['JAVA_HOME'] = maybeJavaHome; } else { - throw new CordovaError(msg); + throw new CordovaError(default_java_error_msg); } } - } else if (isWindows) { + } else if (module.exports.isWindows()) { // Try to auto-detect java in the default install paths. var oldSilent = shelljs.config.silent; shelljs.config.silent = true; @@ -142,28 +201,29 @@ module.exports.check_java = function() { } } }).then(function() { - var msg = - 'Failed to run "javac -version", make sure that you have a JDK installed.\n' + - 'You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.\n'; - if (process.env['JAVA_HOME']) { - msg += 'Your JAVA_HOME is invalid: ' + process.env['JAVA_HOME'] + '\n'; - } - // We use tryCommand with catchStderr = true, because - // javac writes version info to stderr instead of stdout - return tryCommand('javac -version', msg, true) - .then(function (output) { - //Let's check for at least Java 8, and keep it future proof so we can support Java 10 - var match = /javac ((?:1\.)(?:[8-9]\.)(?:\d+))|((?:1\.)(?:[1-9]\d+\.)(?:\d+))/i.exec(output); - return match && match[1]; - }); + var msg = + 'Failed to run "javac -version", make sure that you have a JDK installed.\n' + + 'You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.\n'; + if (process.env['JAVA_HOME']) { + msg += 'Your JAVA_HOME is invalid: ' + process.env['JAVA_HOME'] + '\n'; + } + // We use tryCommand with catchStderr = true, because + // javac writes version info to stderr instead of stdout + return tryCommand('javac -version', msg, true) + .then(function (output) { + //Let's check for at least Java 8, and keep it future proof so we can support Java 10 + var match = /javac ((?:1\.)(?:[8-9]\.)(?:\d+))|((?:1\.)(?:[1-9]\d+\.)(?:\d+))/i.exec(output); + return match && match[1]; }); + }); }; // Returns a promise. module.exports.check_android = function() { return Q().then(function() { var androidCmdPath = forgivingWhichSync('android'); - var adbInPath = !!forgivingWhichSync('adb'); + var adbInPath = forgivingWhichSync('adb'); + var avdmanagerInPath = forgivingWhichSync('avdmanager'); var hasAndroidHome = !!process.env['ANDROID_HOME'] && fs.existsSync(process.env['ANDROID_HOME']); function maybeSetAndroidHome(value) { if (!hasAndroidHome && fs.existsSync(value)) { @@ -171,8 +231,10 @@ module.exports.check_android = function() { process.env['ANDROID_HOME'] = value; } } - if (!hasAndroidHome && !androidCmdPath) { - if (isWindows) { + // First ensure ANDROID_HOME is set + // If we have no hints (nothing in PATH), try a few default locations + if (!hasAndroidHome && !androidCmdPath && !adbInPath && !avdmanagerInPath) { + if (module.exports.isWindows()) { // Android Studio 1.0 installer maybeSetAndroidHome(path.join(process.env['LOCALAPPDATA'], 'Android', 'sdk')); maybeSetAndroidHome(path.join(process.env['ProgramFiles'], 'Android', 'sdk')); @@ -182,7 +244,7 @@ module.exports.check_android = function() { // Stand-alone installer maybeSetAndroidHome(path.join(process.env['LOCALAPPDATA'], 'Android', 'android-sdk')); maybeSetAndroidHome(path.join(process.env['ProgramFiles'], 'Android', 'android-sdk')); - } else if (process.platform == 'darwin') { + } else if (module.exports.isDarwin()) { // Android Studio 1.0 installer maybeSetAndroidHome(path.join(process.env['HOME'], 'Library', 'Android', 'sdk')); // Android Studio pre-1.0 installer @@ -197,26 +259,42 @@ module.exports.check_android = function() { maybeSetAndroidHome(path.join(process.env['HOME'], 'android-sdk')); } } - if (hasAndroidHome && !androidCmdPath) { - process.env['PATH'] += path.delimiter + path.join(process.env['ANDROID_HOME'], 'tools'); - } - if (androidCmdPath && !hasAndroidHome) { - var parentDir = path.dirname(androidCmdPath); - var grandParentDir = path.dirname(parentDir); - if (path.basename(parentDir) == 'tools') { - process.env['ANDROID_HOME'] = path.dirname(parentDir); - hasAndroidHome = true; - } else if (fs.existsSync(path.join(grandParentDir, 'tools', 'android'))) { - process.env['ANDROID_HOME'] = grandParentDir; - hasAndroidHome = true; - } else { - throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' + - 'Detected \'android\' command at ' + parentDir + ' but no \'tools\' directory found near.\n' + - 'Try reinstall Android SDK or update your PATH to include path to valid SDK directory.'); + if (!hasAndroidHome) { + // If we dont have ANDROID_HOME, but we do have some tools on the PATH, try to infer from the tooling PATH. + var parentDir, grandParentDir; + if (androidCmdPath) { + parentDir = path.dirname(androidCmdPath); + grandParentDir = path.dirname(parentDir); + if (path.basename(parentDir) == 'tools' || fs.existsSync(path.join(grandParentDir, 'tools', 'android'))) { + maybeSetAndroidHome(grandParentDir); + } else { + throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' + + 'Detected \'android\' command at ' + parentDir + ' but no \'tools\' directory found near.\n' + + 'Try reinstall Android SDK or update your PATH to include valid path to SDK' + path.sep + 'tools directory.'); + } + } + if (adbInPath) { + parentDir = path.dirname(adbInPath); + grandParentDir = path.dirname(parentDir); + if (path.basename(parentDir) == 'platform-tools') { + maybeSetAndroidHome(grandParentDir); + } else { + throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' + + 'Detected \'adb\' command at ' + parentDir + ' but no \'platform-tools\' directory found near.\n' + + 'Try reinstall Android SDK or update your PATH to include valid path to SDK' + path.sep + 'platform-tools directory.'); + } + } + if (avdmanagerInPath) { + parentDir = path.dirname(avdmanagerInPath); + grandParentDir = path.dirname(parentDir); + if (path.basename(parentDir) == 'bin' && path.basename(grandParentDir) == 'tools') { + maybeSetAndroidHome(path.dirname(grandParentDir)); + } else { + throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' + + 'Detected \'avdmanager\' command at ' + parentDir + ' but no \'tools' + path.sep + 'bin\' directory found near.\n' + + 'Try reinstall Android SDK or update your PATH to include valid path to SDK' + path.sep + 'tools' + path.sep + 'bin directory.'); + } } - } - if (hasAndroidHome && !adbInPath) { - process.env['PATH'] += path.delimiter + path.join(process.env['ANDROID_HOME'], 'platform-tools'); } if (!process.env['ANDROID_HOME']) { throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' + @@ -226,13 +304,27 @@ module.exports.check_android = function() { throw new CordovaError('\'ANDROID_HOME\' environment variable is set to non-existent path: ' + process.env['ANDROID_HOME'] + '\nTry update it manually to point to valid SDK directory.'); } + // Next let's make sure relevant parts of the SDK tooling is in our PATH + if (hasAndroidHome && !androidCmdPath) { + process.env['PATH'] += path.delimiter + path.join(process.env['ANDROID_HOME'], 'tools'); + } + if (hasAndroidHome && !adbInPath) { + process.env['PATH'] += path.delimiter + path.join(process.env['ANDROID_HOME'], 'platform-tools'); + } + if (hasAndroidHome && !avdmanagerInPath) { + process.env['PATH'] += path.delimiter + path.join(process.env['ANDROID_HOME'], 'tools', 'bin'); + } return hasAndroidHome; }); }; +// TODO: is this actually needed? module.exports.getAbsoluteAndroidCmd = function () { var cmd = forgivingWhichSync('android'); - if (process.platform === 'win32') { + if (cmd.length === 0) { + cmd = forgivingWhichSync('sdkmanager'); + } + if (module.exports.isWindows()) { return '"' + cmd + '"'; } return cmd.replace(/(\s)/g, '\\$1'); @@ -244,20 +336,17 @@ module.exports.check_android_target = function(originalError) { // android-L // Google Inc.:Google APIs:20 // Google Inc.:Glass Development Kit Preview:20 - var valid_target = module.exports.get_target(); - var msg = 'Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.'; - return tryCommand('android list targets --compact', msg) - .then(function(output) { - var targets = output.split('\n'); - if (targets.indexOf(valid_target) >= 0) { + var desired_api_level = module.exports.get_target(); + return android_sdk.list_targets() + .then(function(targets) { + if (targets.indexOf(desired_api_level) >= 0) { return targets; } - var androidCmd = module.exports.getAbsoluteAndroidCmd(); - var msg = 'Please install Android target: "' + valid_target + '".\n\n' + + var msg = 'Please install Android target / API level: "' + desired_api_level + '".\n\n' + 'Hint: Open the SDK manager by running: ' + androidCmd + '\n' + 'You will require:\n' + - '1. "SDK Platform" for ' + valid_target + '\n' + + '1. "SDK Platform" for API level ' + desired_api_level + '\n' + '2. "Android SDK Platform-tools (latest)\n' + '3. "Android SDK Build-tools" (latest)'; if (originalError) { @@ -278,7 +367,6 @@ module.exports.run = function() { throw new CordovaError('Requirements check failed for JDK 1.8 or greater'); } - if (!values[1]) { throw new CordovaError('Requirements check failed for Android SDK'); } diff --git a/StoneIsland/platforms/android/cordova/lib/emulator.js b/StoneIsland/platforms/android/cordova/lib/emulator.js index ff1e261c..22209aa0 100644 --- a/StoneIsland/platforms/android/cordova/lib/emulator.js +++ b/StoneIsland/platforms/android/cordova/lib/emulator.js @@ -27,11 +27,15 @@ var path = require('path'); var Adb = require('./Adb'); var AndroidManifest = require('./AndroidManifest'); var events = require('cordova-common').events; -var spawn = require('cordova-common').superspawn.spawn; +var superspawn = require('cordova-common').superspawn; var CordovaError = require('cordova-common').CordovaError; +var shelljs = require('shelljs'); +var android_sdk = require('./android_sdk'); +var check_reqs = require('./check_reqs'); var Q = require('q'); var os = require('os'); +var fs = require('fs'); var child_process = require('child_process'); // constants @@ -42,18 +46,77 @@ var NUM_INSTALL_RETRIES = 3; var CHECK_BOOTED_INTERVAL = 3 * ONE_SECOND; // in milliseconds var EXEC_KILL_SIGNAL = 'SIGKILL'; -/** - * Returns a Promise for a list of emulator images in the form of objects - * { - name : <emulator_name>, - path : <path_to_emulator_image>, - target : <api_target>, - abi : <cpu>, - skin : <skin> - } - */ -module.exports.list_images = function() { - return spawn('android', ['list', 'avds']) +function forgivingWhichSync(cmd) { + try { + return fs.realpathSync(shelljs.which(cmd)); + } catch (e) { + return ''; + } +} + +module.exports.list_images_using_avdmanager = function () { + return superspawn.spawn('avdmanager', ['list', 'avd']) + .then(function(output) { + var response = output.split('\n'); + var emulator_list = []; + for (var i = 1; i < response.length; i++) { + // To return more detailed information use img_obj + var img_obj = {}; + if (response[i].match(/Name:\s/)) { + img_obj['name'] = response[i].split('Name: ')[1].replace('\r', ''); + if (response[i + 1].match(/Device:\s/)) { + i++; + img_obj['device'] = response[i].split('Device: ')[1].replace('\r', ''); + } + if (response[i + 1].match(/Path:\s/)) { + i++; + img_obj['path'] = response[i].split('Path: ')[1].replace('\r', ''); + } + if (response[i + 1].match(/Target:\s/)) { + i++; + if (response[i + 1].match(/ABI:\s/)) { + img_obj['abi'] = response[i + 1].split('ABI: ')[1].replace('\r', ''); + } + // This next conditional just aims to match the old output of `android list avd` + // We do so so that we don't have to change the logic when parsing for the + // best emulator target to spawn (see below in `best_image`) + // This allows us to transitionally support both `android` and `avdmanager` binaries, + // depending on what SDK version the user has + if (response[i + 1].match(/Based\son:\s/)) { + img_obj['target'] = response[i + 1].split('Based on:')[1]; + if (img_obj['target'].match(/Tag\/ABI:\s/)) { + img_obj['target'] = img_obj['target'].split('Tag/ABI:')[0].replace('\r', '').trim(); + if (img_obj['target'].indexOf('(') > -1) { + img_obj['target'] = img_obj['target'].substr(0, img_obj['target'].indexOf('(') - 1).trim(); + } + } + var version_string = img_obj['target'].replace(/Android\s+/, ''); + + var api_level = android_sdk.version_string_to_api_level[version_string]; + if (api_level) { + img_obj['target'] += ' (API level ' + api_level + ')'; + } + } + } + if (response[i + 1].match(/Skin:\s/)) { + i++; + img_obj['skin'] = response[i].split('Skin: ')[1].replace('\r', ''); + } + + emulator_list.push(img_obj); + } + /* To just return a list of names use this + if (response[i].match(/Name:\s/)) { + emulator_list.push(response[i].split('Name: ')[1].replace('\r', ''); + }*/ + + } + return emulator_list; + }); +}; + +module.exports.list_images_using_android = function() { + return superspawn.spawn('android', ['list', 'avd']) .then(function(output) { var response = output.split('\n'); var emulator_list = []; @@ -97,6 +160,29 @@ module.exports.list_images = function() { }; /** + * Returns a Promise for a list of emulator images in the form of objects + * { + name : <emulator_name>, + device : <device>, + path : <path_to_emulator_image>, + target : <api_target>, + abi : <cpu>, + skin : <skin> + } + */ +module.exports.list_images = function() { + if (forgivingWhichSync('avdmanager')) { + return module.exports.list_images_using_avdmanager(); + } else if (forgivingWhichSync('android')) { + return module.exports.list_images_using_android(); + } else { + return Q().then(function() { + throw new CordovaError('Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?'); + }); + } +}; + +/** * Will return the closest avd to the projects target * or undefined if no avds exist. * Returns a promise. @@ -109,8 +195,7 @@ module.exports.best_image = function() { var closest = 9999; var best = images[0]; - // Loading check_reqs at run-time to avoid test-time vs run-time directory structure difference issue - var project_target = require('./check_reqs').get_target().replace('android-', ''); + var project_target = check_reqs.get_target().replace('android-', ''); for (var i in images) { var target = images[i].target; if(target) { @@ -133,8 +218,9 @@ module.exports.list_started = function() { }; // Returns a promise. +// TODO: we should remove this, there's a more robust method under android_sdk.js module.exports.list_targets = function() { - return spawn('android', ['list', 'targets'], {cwd: os.tmpdir()}) + return superspawn.spawn('android', ['list', 'targets'], {cwd: os.tmpdir()}) .then(function(output) { var target_out = output.split('\n'); var targets = []; @@ -189,8 +275,7 @@ module.exports.start = function(emulator_ID, boot_timeout) { return best.name; } - // Loading check_reqs at run-time to avoid test-time vs run-time directory structure difference issue - var androidCmd = require('./check_reqs').getAbsoluteAndroidCmd(); + var androidCmd = check_reqs.getAbsoluteAndroidCmd(); return Q.reject(new CordovaError('No emulator images (avds) found.\n' + '1. Download desired System Image by running: ' + androidCmd + ' sdk\n' + '2. Create an AVD by running: ' + androidCmd + ' avd\n' + @@ -199,10 +284,13 @@ module.exports.start = function(emulator_ID, boot_timeout) { }).then(function(emulatorId) { return self.get_available_port() .then(function (port) { + // Figure out the directory the emulator binary runs in, and set the cwd to that directory. + // Workaround for https://code.google.com/p/android/issues/detail?id=235461 + var emulator_dir = path.dirname(shelljs.which('emulator')); var args = ['-avd', emulatorId, '-port', port]; // Don't wait for it to finish, since the emulator will probably keep running for a long time. child_process - .spawn('emulator', args, { stdio: 'inherit', detached: true }) + .spawn('emulator', args, { stdio: 'inherit', detached: true, cwd: emulator_dir }) .unref(); // wait for emulator to start @@ -294,7 +382,7 @@ module.exports.wait_for_boot = function(emulator_id, time_remaining) { module.exports.create_image = function(name, target) { console.log('Creating new avd named ' + name); if (target) { - return spawn('android', ['create', 'avd', '--name', name, '--target', target]) + return superspawn.spawn('android', ['create', 'avd', '--name', name, '--target', target]) .then(null, function(error) { console.error('ERROR : Failed to create emulator image : '); console.error(' Do you have the latest android targets including ' + target + '?'); @@ -302,7 +390,8 @@ module.exports.create_image = function(name, target) { }); } else { console.log('WARNING : Project target not found, creating avd with a different target but the project may fail to install.'); - return spawn('android', ['create', 'avd', '--name', name, '--target', this.list_targets()[0]]) + // TODO: there's a more robust method for finding targets in android_sdk.js + return superspawn.spawn('android', ['create', 'avd', '--name', name, '--target', this.list_targets()[0]]) .then(function() { // TODO: This seems like another error case, even though it always happens. console.error('ERROR : Unable to create an avd emulator, no targets found.'); diff --git a/StoneIsland/platforms/android/cordova/lib/list-devices b/StoneIsland/platforms/android/cordova/lib/list-devices index fa84d7f6..8e22c7f2 100755 --- a/StoneIsland/platforms/android/cordova/lib/list-devices +++ b/StoneIsland/platforms/android/cordova/lib/list-devices @@ -22,7 +22,7 @@ var devices = require('./device'); // Usage support for when args are given -require('../lib/check_reqs').check_android().then(function() { +require('./check_reqs').check_android().then(function() { devices.list().done(function(device_list) { device_list && device_list.forEach(function(dev) { console.log(dev); diff --git a/StoneIsland/platforms/android/cordova/lib/list-emulator-images b/StoneIsland/platforms/android/cordova/lib/list-emulator-images index 03c827fe..25e5c81a 100755 --- a/StoneIsland/platforms/android/cordova/lib/list-emulator-images +++ b/StoneIsland/platforms/android/cordova/lib/list-emulator-images @@ -22,7 +22,7 @@ var emulators = require('./emulator'); // Usage support for when args are given -require('../lib/check_reqs').check_android().then(function() { +require('./check_reqs').check_android().then(function() { emulators.list_images().done(function(emulator_list) { emulator_list && emulator_list.forEach(function(emu) { console.log(emu.name); diff --git a/StoneIsland/platforms/android/cordova/lib/list-started-emulators b/StoneIsland/platforms/android/cordova/lib/list-started-emulators index a890dec6..43ebda25 100755 --- a/StoneIsland/platforms/android/cordova/lib/list-started-emulators +++ b/StoneIsland/platforms/android/cordova/lib/list-started-emulators @@ -22,7 +22,7 @@ var emulators = require('./emulator'); // Usage support for when args are given -require('../lib/check_reqs').check_android().then(function() { +require('./check_reqs').check_android().then(function() { emulators.list_started().done(function(emulator_list) { emulator_list && emulator_list.forEach(function(emu) { console.log(emu); diff --git a/StoneIsland/platforms/android/cordova/lib/prepare.js b/StoneIsland/platforms/android/cordova/lib/prepare.js index 10a69ea3..504eb612 100644 --- a/StoneIsland/platforms/android/cordova/lib/prepare.js +++ b/StoneIsland/platforms/android/cordova/lib/prepare.js @@ -48,6 +48,7 @@ module.exports.prepare = function (cordovaProject, options) { .then(function () { updateIcons(cordovaProject, path.relative(cordovaProject.root, self.locations.res)); updateSplashes(cordovaProject, path.relative(cordovaProject.root, self.locations.res)); + updateFileResources(cordovaProject, path.relative(cordovaProject.root, self.locations.root)); }) .then(function () { events.emit('verbose', 'Prepared android project successfully'); @@ -72,6 +73,7 @@ module.exports.clean = function (options) { cleanWww(projectRoot, self.locations); cleanIcons(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res)); cleanSplashes(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res)); + cleanFileResources(projectRoot, projectConfig, path.relative(projectRoot, self.locations.root)); }); }; @@ -401,6 +403,44 @@ function mapImageResources(rootDir, subDir, type, resourceName) { return pathMap; } + +function updateFileResources(cordovaProject, platformDir) { + var files = cordovaProject.projectConfig.getFileResources('android'); + + // if there are resource-file elements in config.xml + if (files.length === 0) { + events.emit('verbose', 'This app does not have additional resource files defined'); + return; + } + + var resourceMap = {}; + files.forEach(function(res) { + var targetPath = path.join(platformDir, res.target); + resourceMap[targetPath] = res.src; + }); + + events.emit('verbose', 'Updating resource files at ' + platformDir); + FileUpdater.updatePaths( + resourceMap, { rootDir: cordovaProject.root }, logFileOp); +} + + +function cleanFileResources(projectRoot, projectConfig, platformDir) { + var files = projectConfig.getFileResources('android'); + if (files.length > 0) { + events.emit('verbose', 'Cleaning resource files at ' + platformDir); + + var resourceMap = {}; + files.forEach(function(res) { + var filePath = path.join(platformDir, res.target); + resourceMap[filePath] = null; + }); + + FileUpdater.updatePaths( + resourceMap, { rootDir: projectRoot, all: true}, logFileOp); + } +} + /** * Gets and validates 'AndroidLaunchMode' prepference from config.xml. Returns * preference value and warns if it doesn't seems to be valid diff --git a/StoneIsland/platforms/android/cordova/version b/StoneIsland/platforms/android/cordova/version index 9bf79a18..cdc2e80a 100755 --- a/StoneIsland/platforms/android/cordova/version +++ b/StoneIsland/platforms/android/cordova/version @@ -20,7 +20,7 @@ */ // Coho updates this line: -var VERSION = "6.1.2"; +var VERSION = "6.2.3"; module.exports.version = VERSION; diff --git a/StoneIsland/platforms/android/google-services.json b/StoneIsland/platforms/android/google-services.json deleted file mode 100644 index e69de29b..00000000 --- a/StoneIsland/platforms/android/google-services.json +++ /dev/null diff --git a/StoneIsland/platforms/android/phonegap-plugin-push/stoneisland-push.gradle b/StoneIsland/platforms/android/phonegap-plugin-push/stoneisland-push.gradle index 11e735ae..1506191b 100644 --- a/StoneIsland/platforms/android/phonegap-plugin-push/stoneisland-push.gradle +++ b/StoneIsland/platforms/android/phonegap-plugin-push/stoneisland-push.gradle @@ -16,6 +16,24 @@ android { } defaultConfig { + multiDexEnabled true applicationId = doExtractStringFromManifest("package") } } + +buildscript { + repositories { + jcenter() + mavenLocal() + } + dependencies { + classpath 'com.android.tools.build:gradle:+' + classpath 'com.google.gms:google-services:3.0.0' + } +} + +// apply plugin: 'com.google.gms.google-services' +// class must be used instead of id(string) to be able to apply plugin from non-root gradle file +ext.postBuildExtras = { + apply plugin: com.google.gms.googleservices.GoogleServicesPlugin +} diff --git a/StoneIsland/platforms/android/platform_www/cordova.js b/StoneIsland/platforms/android/platform_www/cordova.js index 18c020e7..bda7c3e5 100644 --- a/StoneIsland/platforms/android/platform_www/cordova.js +++ b/StoneIsland/platforms/android/platform_www/cordova.js @@ -1,5 +1,5 @@ // Platform: android -// 7c5fcc5a5adfbf3fb8ceaf36fbdd4bd970bd9c20 +// 7ef9f9c03167a4dde4372d869472241b6816fee9 /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var PLATFORM_VERSION_BUILD_LABEL = '6.1.2'; +var PLATFORM_VERSION_BUILD_LABEL = '6.2.3'; // file: src/scripts/require.js /*jshint -W079 */ @@ -330,7 +330,7 @@ module.exports = cordova; }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js +// file: /Users/maj/src/cordova-android/cordova-js-src/android/nativeapiprovider.js define("cordova/android/nativeapiprovider", function(require, exports, module) { /** @@ -353,7 +353,7 @@ module.exports = { }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js +// file: /Users/maj/src/cordova-android/cordova-js-src/android/promptbasednativeapi.js define("cordova/android/promptbasednativeapi", function(require, exports, module) { /** @@ -886,7 +886,7 @@ module.exports = channel; }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/exec.js +// file: /Users/maj/src/cordova-android/cordova-js-src/exec.js define("cordova/exec", function(require, exports, module) { /** @@ -1649,7 +1649,7 @@ exports.reset(); }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/platform.js +// file: /Users/maj/src/cordova-android/cordova-js-src/platform.js define("cordova/platform", function(require, exports, module) { // The last resume event that was received that had the result of a plugin call. @@ -1759,7 +1759,7 @@ function onMessageFromNative(msg) { }); -// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/plugin/android/app.js +// file: /Users/maj/src/cordova-android/cordova-js-src/plugin/android/app.js define("cordova/plugin/android/app", function(require, exports, module) { var exec = require('cordova/exec'); diff --git a/StoneIsland/platforms/android/platform_www/cordova_plugins.js b/StoneIsland/platforms/android/platform_www/cordova_plugins.js index ea5e1643..8aaece20 100755 --- a/StoneIsland/platforms/android/platform_www/cordova_plugins.js +++ b/StoneIsland/platforms/android/platform_www/cordova_plugins.js @@ -98,14 +98,6 @@ module.exports = [ "runs": true }, { - "id": "phonegap-plugin-push.PushNotification", - "file": "plugins/phonegap-plugin-push/www/push.js", - "pluginId": "phonegap-plugin-push", - "clobbers": [ - "PushNotification" - ] - }, - { "id": "cordova-plugin-statusbar.statusbar", "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", "pluginId": "cordova-plugin-statusbar", @@ -114,11 +106,11 @@ module.exports = [ ] }, { - "id": "cordova-plugin-firebase.FirebasePlugin", - "file": "plugins/cordova-plugin-firebase/www/firebase.js", - "pluginId": "cordova-plugin-firebase", + "id": "phonegap-plugin-push.PushNotification", + "file": "plugins/phonegap-plugin-push/www/push.js", + "pluginId": "phonegap-plugin-push", "clobbers": [ - "FirebasePlugin" + "PushNotification" ] } ]; @@ -137,10 +129,9 @@ module.exports.metadata = "cordova-plugin-compat": "1.1.0", "cordova-plugin-geolocation": "2.4.0", "ionic-plugin-keyboard": "2.2.1", - "phonegap-plugin-push": "1.9.2", "cordova-plugin-statusbar": "2.2.3", - "cordova-plugin-firebase": "0.1.24", - "cordova-plugin-app-name": "1.0.4" + "cordova-plugin-app-name": "1.0.4", + "phonegap-plugin-push": "2.0.0" }; // BOTTOM OF METADATA });
\ No newline at end of file diff --git a/StoneIsland/platforms/android/platform_www/plugins/cordova-plugin-firebase/www/firebase.js b/StoneIsland/platforms/android/platform_www/plugins/cordova-plugin-firebase/www/firebase.js deleted file mode 100644 index e1e423d1..00000000 --- a/StoneIsland/platforms/android/platform_www/plugins/cordova-plugin-firebase/www/firebase.js +++ /dev/null @@ -1,124 +0,0 @@ -cordova.define("cordova-plugin-firebase.FirebasePlugin", function(require, exports, module) { -var exec = require('cordova/exec'); - -exports.getInstanceId = function(success, error) { - exec(success, error, "FirebasePlugin", "getInstanceId", []); -}; - -exports.getToken = function(success, error) { - exec(success, error, "FirebasePlugin", "getToken", []); -}; - -exports.onNotificationOpen = function(success, error) { - exec(success, error, "FirebasePlugin", "onNotificationOpen", []); -}; - -exports.onTokenRefresh = function(success, error) { - exec(success, error, "FirebasePlugin", "onTokenRefresh", []); -}; - -exports.grantPermission = function(success, error) { - exec(success, error, "FirebasePlugin", "grantPermission", []); -}; - -exports.hasPermission = function(success, error) { - exec(success, error, "FirebasePlugin", "hasPermission", []); -}; - -exports.setBadgeNumber = function(number, success, error) { - exec(success, error, "FirebasePlugin", "setBadgeNumber", [number]); -}; - -exports.getBadgeNumber = function(success, error) { - exec(success, error, "FirebasePlugin", "getBadgeNumber", []); -}; - -exports.subscribe = function(topic, success, error) { - exec(success, error, "FirebasePlugin", "subscribe", [topic]); -}; - -exports.unsubscribe = function(topic, success, error) { - exec(success, error, "FirebasePlugin", "unsubscribe", [topic]); -}; - -exports.unregister = function(success, error) { - exec(success, error, "FirebasePlugin", "unregister", []); -}; - -exports.logEvent = function(name, params, success, error) { - exec(success, error, "FirebasePlugin", "logEvent", [name, params]); -}; - -exports.logError = function(message, success, error) { - exec(success, error, "FirebasePlugin", "logError", [message]); -}; - -exports.setScreenName = function(name, success, error) { - exec(success, error, "FirebasePlugin", "setScreenName", [name]); -}; - -exports.setUserId = function(id, success, error) { - exec(success, error, "FirebasePlugin", "setUserId", [id]); -}; - -exports.setUserProperty = function(name, value, success, error) { - exec(success, error, "FirebasePlugin", "setUserProperty", [name, value]); -}; - -exports.activateFetched = function (success, error) { - exec(success, error, "FirebasePlugin", "activateFetched", []); -}; - -exports.fetch = function (cacheExpirationSeconds, success, error) { - var args = []; - if (typeof cacheExpirationSeconds === 'number') { - args.push(cacheExpirationSeconds); - } else { - error = success; - success = cacheExpirationSeconds; - } - exec(success, error, "FirebasePlugin", "fetch", args); -}; - -exports.getByteArray = function (key, namespace, success, error) { - var args = [key]; - if (typeof namespace === 'string') { - args.push(namespace); - } else { - error = success; - success = namespace; - } - exec(success, error, "FirebasePlugin", "getByteArray", args); -}; - -exports.getValue = function (key, namespace, success, error) { - var args = [key]; - if (typeof namespace === 'string') { - args.push(namespace); - } else { - error = success; - success = namespace; - } - exec(success, error, "FirebasePlugin", "getValue", args); -}; - -exports.getInfo = function (success, error) { - exec(success, error, "FirebasePlugin", "getInfo", []); -}; - -exports.setConfigSettings = function (settings, success, error) { - exec(success, error, "FirebasePlugin", "setConfigSettings", [settings]); -}; - -exports.setDefaults = function (defaults, namespace, success, error) { - var args = [defaults]; - if (typeof namespace === 'string') { - args.push(namespace); - } else { - error = success; - success = namespace; - } - exec(success, error, "FirebasePlugin", "setDefaults", args); -}; - -}); diff --git a/StoneIsland/platforms/android/platform_www/plugins/phonegap-plugin-push/www/push.js b/StoneIsland/platforms/android/platform_www/plugins/phonegap-plugin-push/www/push.js index a5315486..7234d474 100644 --- a/StoneIsland/platforms/android/platform_www/plugins/phonegap-plugin-push/www/push.js +++ b/StoneIsland/platforms/android/platform_www/plugins/phonegap-plugin-push/www/push.js @@ -1,4 +1,16 @@ cordova.define("phonegap-plugin-push.PushNotification", function(require, exports, module) { +/** +* This file has been generated by Babel. +* +* DO NOT EDIT IT DIRECTLY +* +* Edit the JS source file src/js/push.js +**/'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + /* global cordova:false */ /* globals window */ @@ -8,322 +20,358 @@ cordova.define("phonegap-plugin-push.PushNotification", function(require, export var exec = cordova.require('cordova/exec'); -/** - * PushNotification constructor. - * - * @param {Object} options to initiate Push Notifications. - * @return {PushNotification} instance that can be monitored and cancelled. - */ +var PushNotification = function () { + /** + * PushNotification constructor. + * + * @param {Object} options to initiate Push Notifications. + * @return {PushNotification} instance that can be monitored and cancelled. + */ + function PushNotification(options) { + var _this = this; + + _classCallCheck(this, PushNotification); -var PushNotification = function(options) { - this._handlers = { - 'registration': [], - 'notification': [], - 'error': [] + this.handlers = { + registration: [], + notification: [], + error: [] }; // require options parameter if (typeof options === 'undefined') { - throw new Error('The options argument is required.'); + throw new Error('The options argument is required.'); } // store the options to this object instance this.options = options; // triggered on registration and notification - var that = this; - var success = function(result) { - if (result && typeof result.registrationId !== 'undefined') { - that.emit('registration', result); - } else if (result && result.additionalData && typeof result.additionalData.actionCallback !== 'undefined') { - var executeFuctionOrEmitEventByName = function(callbackName, context, arg) { - var namespaces = callbackName.split('.'); - var func = namespaces.pop(); - for (var i = 0; i < namespaces.length; i++) { - context = context[namespaces[i]]; - } + var success = function success(result) { + if (result && typeof result.registrationId !== 'undefined') { + _this.emit('registration', result); + } else if (result && result.additionalData && typeof result.additionalData.actionCallback !== 'undefined') { + var executeFuctionOrEmitEventByName = function executeFuctionOrEmitEventByName(functionName, context) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } - if (typeof context[func] === 'function') { - context[func].call(context, arg); - } else { - that.emit(callbackName, arg); - } - }; + var namespaces = functionName.split('.'); + var func = namespaces.pop(); + for (var i = 0; i < namespaces.length; i++) { + context = context[namespaces[i]]; + } - executeFuctionOrEmitEventByName(result.additionalData.actionCallback, window, result); - } else if (result) { - that.emit('notification', result); - } + if (typeof context[func] === 'function') { + context[func].call(context, args); + } else { + _this.emit(functionName, args); + } + }; + + executeFuctionOrEmitEventByName(result.additionalData.actionCallback, window, result); + } else if (result) { + _this.emit('notification', result); + } }; // triggered on error - var fail = function(msg) { - var e = (typeof msg === 'string') ? new Error(msg) : msg; - that.emit('error', e); + var fail = function fail(msg) { + var e = typeof msg === 'string' ? new Error(msg) : msg; + _this.emit('error', e); }; // wait at least one process tick to allow event subscriptions - setTimeout(function() { - exec(success, fail, 'PushNotification', 'init', [options]); + setTimeout(function () { + exec(success, fail, 'PushNotification', 'init', [options]); }, 10); -}; + } + + /** + * Unregister from push notifications + */ -/** - * Unregister from push notifications - */ -PushNotification.prototype.unregister = function(successCallback, errorCallback, options) { - if (!errorCallback) { errorCallback = function() {}; } + _createClass(PushNotification, [{ + key: 'unregister', + value: function unregister(successCallback) { + var _this2 = this; - if (typeof errorCallback !== 'function') { + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; + var options = arguments[2]; + + if (typeof errorCallback !== 'function') { console.log('PushNotification.unregister failure: failure parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.unregister failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.unregister failure: success callback parameter ' + ' must be a function'); return; - } + } - var that = this; - var cleanHandlersAndPassThrough = function() { + var cleanHandlersAndPassThrough = function cleanHandlersAndPassThrough() { if (!options) { - that._handlers = { - 'registration': [], - 'notification': [], - 'error': [] - }; + _this2.handlers = { + registration: [], + notification: [], + error: [] + }; } successCallback(); - }; + }; - exec(cleanHandlersAndPassThrough, errorCallback, 'PushNotification', 'unregister', [options]); -}; + exec(cleanHandlersAndPassThrough, errorCallback, 'PushNotification', 'unregister', [options]); + } -/** - * subscribe to a topic - * @param {String} topic topic to subscribe - * @param {Function} successCallback success callback - * @param {Function} errorCallback error callback - * @return {void} - */ -PushNotification.prototype.subscribe = function(topic, successCallback, errorCallback) { - if (!errorCallback) { errorCallback = function() {}; } + /** + * subscribe to a topic + * @param {String} topic topic to subscribe + * @param {Function} successCallback success callback + * @param {Function} errorCallback error callback + * @return {void} + */ + + }, { + key: 'subscribe', + value: function subscribe(topic, successCallback) { + var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {}; - if (typeof errorCallback !== 'function') { - console.log('PushNotification.subscribe failure: failure parameter not a function'); + if (typeof errorCallback !== 'function') { + console.log('PushNotification.subscribe failure: ' + 'failure parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.subscribe failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.subscribe failure: ' + 'success callback parameter must be a function'); return; + } + + exec(successCallback, errorCallback, 'PushNotification', 'subscribe', [topic]); } - exec(successCallback, errorCallback, 'PushNotification', 'subscribe', [topic]); -}; + /** + * unsubscribe to a topic + * @param {String} topic topic to unsubscribe + * @param {Function} successCallback success callback + * @param {Function} errorCallback error callback + * @return {void} + */ -/** - * unsubscribe to a topic - * @param {String} topic topic to unsubscribe - * @param {Function} successCallback success callback - * @param {Function} errorCallback error callback - * @return {void} - */ -PushNotification.prototype.unsubscribe = function(topic, successCallback, errorCallback) { - if (!errorCallback) { errorCallback = function() {}; } + }, { + key: 'unsubscribe', + value: function unsubscribe(topic, successCallback) { + var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {}; - if (typeof errorCallback !== 'function') { + if (typeof errorCallback !== 'function') { console.log('PushNotification.unsubscribe failure: failure parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.unsubscribe failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.unsubscribe failure: ' + 'success callback parameter must be a function'); return; - } + } - exec(successCallback, errorCallback, 'PushNotification', 'unsubscribe', [topic]); -}; + exec(successCallback, errorCallback, 'PushNotification', 'unsubscribe', [topic]); + } -/** - * Call this to set the application icon badge - */ + /** + * Call this to set the application icon badge + */ -PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallback, errorCallback, badge) { - if (!errorCallback) { errorCallback = function() {}; } + }, { + key: 'setApplicationIconBadgeNumber', + value: function setApplicationIconBadgeNumber(successCallback) { + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; + var badge = arguments[2]; - if (typeof errorCallback !== 'function') { - console.log('PushNotification.setApplicationIconBadgeNumber failure: failure parameter not a function'); + if (typeof errorCallback !== 'function') { + console.log('PushNotification.setApplicationIconBadgeNumber failure: failure ' + 'parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.setApplicationIconBadgeNumber failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.setApplicationIconBadgeNumber failure: success ' + 'callback parameter must be a function'); return; - } + } - exec(successCallback, errorCallback, 'PushNotification', 'setApplicationIconBadgeNumber', [{badge: badge}]); -}; + exec(successCallback, errorCallback, 'PushNotification', 'setApplicationIconBadgeNumber', [{ badge: badge }]); + } -/** - * Get the application icon badge - */ + /** + * Get the application icon badge + */ -PushNotification.prototype.getApplicationIconBadgeNumber = function(successCallback, errorCallback) { - if (!errorCallback) { errorCallback = function() {}; } + }, { + key: 'getApplicationIconBadgeNumber', + value: function getApplicationIconBadgeNumber(successCallback) { + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; - if (typeof errorCallback !== 'function') { - console.log('PushNotification.getApplicationIconBadgeNumber failure: failure parameter not a function'); + if (typeof errorCallback !== 'function') { + console.log('PushNotification.getApplicationIconBadgeNumber failure: failure ' + 'parameter not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.getApplicationIconBadgeNumber failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.getApplicationIconBadgeNumber failure: success ' + 'callback parameter must be a function'); return; - } + } - exec(successCallback, errorCallback, 'PushNotification', 'getApplicationIconBadgeNumber', []); -}; + exec(successCallback, errorCallback, 'PushNotification', 'getApplicationIconBadgeNumber', []); + } -/** - * Get the application icon badge - */ + /** + * Clear all notifications + */ -PushNotification.prototype.clearAllNotifications = function(successCallback, errorCallback) { - if (!successCallback) { successCallback = function() {}; } - if (!errorCallback) { errorCallback = function() {}; } + }, { + key: 'clearAllNotifications', + value: function clearAllNotifications() { + var successCallback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; - if (typeof errorCallback !== 'function') { - console.log('PushNotification.clearAllNotifications failure: failure parameter not a function'); + if (typeof errorCallback !== 'function') { + console.log('PushNotification.clearAllNotifications failure: failure parameter ' + 'not a function'); return; - } + } - if (typeof successCallback !== 'function') { - console.log('PushNotification.clearAllNotifications failure: success callback parameter must be a function'); + if (typeof successCallback !== 'function') { + console.log('PushNotification.clearAllNotifications failure: success callback ' + 'parameter must be a function'); return; - } + } - exec(successCallback, errorCallback, 'PushNotification', 'clearAllNotifications', []); -}; - -/** - * Listen for an event. - * - * Any event is supported, but the following are built-in: - * - * - registration - * - notification - * - error - * - * @param {String} eventName to subscribe to. - * @param {Function} callback triggered on the event. - */ + exec(successCallback, errorCallback, 'PushNotification', 'clearAllNotifications', []); + } + /** + * Listen for an event. + * + * The following events are supported: + * + * - registration + * - notification + * - error + * + * @param {String} eventName to subscribe to. + * @param {Function} callback triggered on the event. + */ -PushNotification.prototype.on = function(eventName, callback) { - if (!this._handlers.hasOwnProperty(eventName)) { - this._handlers[eventName] = []; + }, { + key: 'on', + value: function on(eventName, callback) { + if (!this.handlers.hasOwnProperty(eventName)) { + this.handlers[eventName] = []; + } + this.handlers[eventName].push(callback); } - this._handlers[eventName].push(callback); -}; -/** - * Remove event listener. - * - * @param {String} eventName to match subscription. - * @param {Function} handle function associated with event. - */ + /** + * Remove event listener. + * + * @param {String} eventName to match subscription. + * @param {Function} handle function associated with event. + */ -PushNotification.prototype.off = function (eventName, handle) { - if (this._handlers.hasOwnProperty(eventName)) { - var handleIndex = this._handlers[eventName].indexOf(handle); + }, { + key: 'off', + value: function off(eventName, handle) { + if (this.handlers.hasOwnProperty(eventName)) { + var handleIndex = this.handlers[eventName].indexOf(handle); if (handleIndex >= 0) { - this._handlers[eventName].splice(handleIndex, 1); + this.handlers[eventName].splice(handleIndex, 1); } + } } -}; -/** - * Emit an event. - * - * This is intended for internal use only. - * - * @param {String} eventName is the event to trigger. - * @param {*} all arguments are passed to the event listeners. - * - * @return {Boolean} is true when the event is triggered otherwise false. - */ + /** + * Emit an event. + * + * This is intended for internal use only. + * + * @param {String} eventName is the event to trigger. + * @param {*} all arguments are passed to the event listeners. + * + * @return {Boolean} is true when the event is triggered otherwise false. + */ -PushNotification.prototype.emit = function() { - var args = Array.prototype.slice.call(arguments); - var eventName = args.shift(); + }, { + key: 'emit', + value: function emit() { + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } - if (!this._handlers.hasOwnProperty(eventName)) { + var eventName = args.shift(); + + if (!this.handlers.hasOwnProperty(eventName)) { return false; - } + } - for (var i = 0, length = this._handlers[eventName].length; i < length; i++) { - var callback = this._handlers[eventName][i]; + for (var i = 0, length = this.handlers[eventName].length; i < length; i++) { + var callback = this.handlers[eventName][i]; if (typeof callback === 'function') { - callback.apply(undefined,args); + callback.apply(undefined, args); } else { - console.log('event handler: ' + eventName + ' must be a function'); + console.log('event handler: ' + eventName + ' must be a function'); } - } + } - return true; -}; - -PushNotification.prototype.finish = function(successCallback, errorCallback, id) { - if (!successCallback) { successCallback = function() {}; } - if (!errorCallback) { errorCallback = function() {}; } - if (!id) { id = 'handler'; } + return true; + } + }, { + key: 'finish', + value: function finish() { + var successCallback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; + var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; + var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'handler'; - if (typeof successCallback !== 'function') { + if (typeof successCallback !== 'function') { console.log('finish failure: success callback parameter must be a function'); return; - } + } - if (typeof errorCallback !== 'function') { + if (typeof errorCallback !== 'function') { console.log('finish failure: failure parameter not a function'); return; + } + + exec(successCallback, errorCallback, 'PushNotification', 'finish', [id]); } + }]); - exec(successCallback, errorCallback, 'PushNotification', 'finish', [id]); -}; + return PushNotification; +}(); /*! * Push Notification Plugin. */ module.exports = { - /** - * Register for Push Notifications. - * - * This method will instantiate a new copy of the PushNotification object - * and start the registration process. - * - * @param {Object} options - * @return {PushNotification} instance - */ - - init: function(options) { - return new PushNotification(options); - }, + /** + * Register for Push Notifications. + * + * This method will instantiate a new copy of the PushNotification object + * and start the registration process. + * + * @param {Object} options + * @return {PushNotification} instance + */ - hasPermission: function(successCallback, errorCallback) { - exec(successCallback, errorCallback, 'PushNotification', 'hasPermission', []); - }, + init: function init(options) { + return new PushNotification(options); + }, - /** - * PushNotification Object. - * - * Expose the PushNotification object for direct use - * and testing. Typically, you should use the - * .init helper method. - */ + hasPermission: function hasPermission(successCallback, errorCallback) { + exec(successCallback, errorCallback, 'PushNotification', 'hasPermission', []); + }, - PushNotification: PushNotification + /** + * PushNotification Object. + * + * Expose the PushNotification object for direct use + * and testing. Typically, you should use the + * .init helper method. + */ + PushNotification: PushNotification }; - }); diff --git a/StoneIsland/platforms/android/project.properties b/StoneIsland/platforms/android/project.properties index c708ff82..0a077db0 100755 --- a/StoneIsland/platforms/android/project.properties +++ b/StoneIsland/platforms/android/project.properties @@ -11,14 +11,8 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. target=android-25 -android.library.reference.1=CordovaLib cordova.gradle.include.1=phonegap-plugin-push/stoneisland-push.gradle -cordova.system.library.1=com.android.support:support-v13:23+ -cordova.system.library.2=com.google.android.gms:play-services-gcm:9.8+ -cordova.system.library.3=me.leolin:ShortcutBadger:1.1.11@aar -cordova.gradle.include.2=cordova-plugin-firebase/stoneisland-build.gradle -cordova.system.library.4=com.google.gms:google-services:+ -cordova.system.library.5=com.google.firebase:firebase-core:+ -cordova.system.library.6=com.google.firebase:firebase-messaging:+ -cordova.system.library.7=com.google.firebase:firebase-crash:+ -cordova.system.library.8=com.google.firebase:firebase-config:+
\ No newline at end of file +cordova.system.library.1=com.android.support:support-v13:25.1.0 +cordova.system.library.2=me.leolin:ShortcutBadger:1.1.17@aar +cordova.system.library.3=com.google.firebase:firebase-messaging:11.0.1 +android.library.reference.1=CordovaLib diff --git a/StoneIsland/platforms/android/res/values/colors.xml b/StoneIsland/platforms/android/res/values/colors.xml deleted file mode 100644 index 6f1665a5..00000000 --- a/StoneIsland/platforms/android/res/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <color name="primary">#FFFFFF00</color> - <color name="primary_dark">#FF220022</color> - <color name="accent">#FF00FFFF</color> -</resources>
\ No newline at end of file diff --git a/StoneIsland/platforms/android/res/values/strings.xml b/StoneIsland/platforms/android/res/values/strings.xml index 84421037..bd922fe9 100755 --- a/StoneIsland/platforms/android/res/values/strings.xml +++ b/StoneIsland/platforms/android/res/values/strings.xml @@ -3,7 +3,4 @@ <string name="app_name">Stone Island</string> <string name="launcher_name">@string/app_name</string> <string name="activity_name">@string/launcher_name</string> - <string name="google_app_id">XXXXXXX</string> - <string name="google_app_id">@string/google_app_id</string> - <string name="google_api_key">@string/google_api_key</string> </resources> diff --git a/StoneIsland/platforms/android/res/xml/config.xml b/StoneIsland/platforms/android/res/xml/config.xml index 3125e402..549366ea 100644 --- a/StoneIsland/platforms/android/res/xml/config.xml +++ b/StoneIsland/platforms/android/res/xml/config.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget android-versionCode="6000" id="us.okfoc.stoneisland" version="0.8.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget android-versionCode="6090" id="us.okfoc.stoneisland" version="0.9.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <feature name="InAppBrowser"> <param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" /> </feature> @@ -33,15 +33,16 @@ <param name="android-package" value="io.ionic.keyboard.IonicKeyboard" /> <param name="onload" value="true" /> </feature> - <feature name="PushNotification"> - <param name="android-package" value="com.adobe.phonegap.push.PushPlugin" /> + <feature name="StatusBar"> + <param name="android-package" value="org.apache.cordova.statusbar.StatusBar" /> + <param name="onload" value="true" /> </feature> - <name>Stone Island</name> + <name>StoneIsland</name> <description> Stone Island </description> - <author email="frontdesk@okfoc.us" href="http://okfoc.us/"> - OKFocus + <author email="julescarbon@gmail.com" href="http://asdf.us/"> + Jules Laplace </author> <content src="index.html" /> <access origin="*" /> @@ -53,6 +54,7 @@ <allow-intent href="geo:*" /> <allow-intent href="market:*" /> <preference name="loglevel" value="DEBUG" /> + <preference name="AppName" value="Stone Island" /> <preference name="EnableViewportScale" value="true" /> <preference name="BackupWebStorage" value="local" /> <preference name="TopActivityIndicator" value="white" /> @@ -61,21 +63,15 @@ <preference name="HideKeyboardFormAccessoryBar" value="false" /> <preference name="orientation" value="portrait" /> <preference name="StatusBarOverlaysWebView" value="false" /> - <preference name="StatusBarBackgroundColor" value="#000000" /> - <preference name="StatusBarStyle" value="lightcontent" /> + <preference name="StatusBarBackgroundColor" value="#ffffff" /> + <preference name="StatusBarStyle" value="default" /> <preference name="SplashMaintainAspectRatio" value="true" /> <preference name="ShowSplashScreenSpinner" value="false" /> <preference name="AutoHideSplashScreen" value="false" /> <preference name="AllowInlineMediaPlayback" value="true" /> <preference name="AndroidLaunchMode" value="singleTop" /> <preference name="android-minSdkVersion" value="21" /> - <feature name="StatusBar"> - <param name="android-package" value="org.apache.cordova.statusbar.StatusBar" /> - <param name="onload" value="true" /> - </feature> - <feature name="FirebasePlugin"> - <param name="android-package" value="org.apache.cordova.firebase.FirebasePlugin" /> - <param name="onload" value="true" /> + <feature name="PushNotification"> + <param name="android-package" value="com.adobe.phonegap.push.PushPlugin" /> </feature> - <preference name="AppName" value="Stone Island" /> </widget> diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/BackgroundActionButtonHandler.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/BackgroundActionButtonHandler.java index 3ccea6cb..4456f525 100644 --- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/BackgroundActionButtonHandler.java +++ b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/BackgroundActionButtonHandler.java @@ -9,7 +9,7 @@ import android.util.Log; import android.support.v4.app.RemoteInput; public class BackgroundActionButtonHandler extends BroadcastReceiver implements PushConstants { - private static String LOG_TAG = "PushPlugin_BackgroundActionButtonHandler"; + private static String LOG_TAG = "Push_BGActionButton"; @Override public void onReceive(Context context, Intent intent) { @@ -19,7 +19,7 @@ public class BackgroundActionButtonHandler extends BroadcastReceiver implements int notId = intent.getIntExtra(NOT_ID, 0); Log.d(LOG_TAG, "not id = " + notId); NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); - notificationManager.cancel(GCMIntentService.getAppName(context), notId); + notificationManager.cancel(FCMService.getAppName(context), notId); if (extras != null) { Bundle originalExtras = extras.getBundle(PUSH_BUNDLE); diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/FCMService.java index e1a2b75c..af328fb2 100644 --- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java +++ b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/FCMService.java @@ -13,17 +13,23 @@ import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Color; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffXfermode; +import android.graphics.Rect; +import android.graphics.RectF; +import android.graphics.Paint; +import android.graphics.Canvas; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationManagerCompat; import android.support.v4.app.NotificationCompat.WearableExtender; import android.support.v4.app.RemoteInput; import android.text.Html; import android.text.Spanned; import android.util.Log; -import com.google.android.gms.gcm.GcmListenerService; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; import org.json.JSONArray; import org.json.JSONException; @@ -36,12 +42,13 @@ import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.Random; @SuppressLint("NewApi") -public class GCMIntentService extends GcmListenerService implements PushConstants { +public class FCMService extends FirebaseMessagingService implements PushConstants { - private static final String LOG_TAG = "PushPlugin_GCMIntentService"; + private static final String LOG_TAG = "Push_FCMService"; private static HashMap<Integer, ArrayList<String>> messageMap = new HashMap<Integer, ArrayList<String>>(); public void setNotification(int notId, String message){ @@ -59,17 +66,31 @@ public class GCMIntentService extends GcmListenerService implements PushConstant } @Override - public void onMessageReceived(String from, Bundle extras) { + public void onMessageReceived(RemoteMessage message){ + + String from = message.getFrom(); Log.d(LOG_TAG, "onMessage - from: " + from); - if (extras != null) { + Bundle extras = new Bundle(); + + if (message.getNotification()!=null) { + extras.putString(TITLE,message.getNotification().getTitle()); + extras.putString(MESSAGE,message.getNotification().getBody()); + } + for (Map.Entry<String, String> entry : message.getData().entrySet()) { + extras.putString(entry.getKey(), entry.getValue()); + } + + if (extras != null && isAvailableSender(from)) { Context applicationContext = getApplicationContext(); SharedPreferences prefs = applicationContext.getSharedPreferences(PushPlugin.COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE); boolean forceShow = prefs.getBoolean(FORCE_SHOW, false); boolean clearBadge = prefs.getBoolean(CLEAR_BADGE, false); + String messageKey = prefs.getString(MESSAGE_KEY, MESSAGE); + String titleKey = prefs.getString(TITLE_KEY, TITLE); - extras = normalizeExtras(applicationContext, extras); + extras = normalizeExtras(applicationContext, extras, messageKey, titleKey); if (clearBadge) { PushPlugin.setApplicationIconBadgeNumber(getApplicationContext(), 0); @@ -167,10 +188,10 @@ public class GCMIntentService extends GcmListenerService implements PushConstant /* * Replace alternate keys with our canonical value */ - private String normalizeKey(String key) { - if (key.equals(BODY) || key.equals(ALERT) || key.equals(GCM_NOTIFICATION_BODY) || key.equals(TWILIO_BODY)) { + private String normalizeKey(String key, String messageKey, String titleKey) { + if (key.equals(BODY) || key.equals(ALERT) || key.equals(MP_MESSAGE) || key.equals(GCM_NOTIFICATION_BODY) || key.equals(TWILIO_BODY) || key.equals(messageKey)) { return MESSAGE; - } else if (key.equals(TWILIO_TITLE)) { + } else if (key.equals(TWILIO_TITLE) || key.equals(SUBJECT) || key.equals(titleKey)) { return TITLE; }else if (key.equals(MSGCNT) || key.equals(BADGE)) { return COUNT; @@ -191,7 +212,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant /* * Parse bundle into normalized keys. */ - private Bundle normalizeExtras(Context context, Bundle extras) { + private Bundle normalizeExtras(Context context, Bundle extras, String messageKey, String titleKey) { Log.d(LOG_TAG, "normalize extras"); Iterator<String> it = extras.keySet().iterator(); Bundle newExtras = new Bundle(); @@ -203,7 +224,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant // If normalizeKeythe key is "data" or "message" and the value is a json object extract // This is to support parse.com and other services. Issue #147 and pull #218 - if (key.equals(PARSE_COM_DATA) || key.equals(MESSAGE)) { + if (key.equals(PARSE_COM_DATA) || key.equals(MESSAGE) || key.equals(messageKey)) { Object json = extras.get(key); // Make sure data is json object stringified if ( json instanceof String && ((String) json).startsWith("{") ) { @@ -211,7 +232,8 @@ public class GCMIntentService extends GcmListenerService implements PushConstant try { // If object contains message keys promote each value to the root of the bundle JSONObject data = new JSONObject((String) json); - if ( data.has(ALERT) || data.has(MESSAGE) || data.has(BODY) || data.has(TITLE) ) { + if ( data.has(ALERT) || data.has(MESSAGE) || data.has(BODY) || data.has(TITLE) || + data.has(messageKey) || data.has(titleKey) ) { Iterator<String> jsonIter = data.keys(); while (jsonIter.hasNext()) { String jsonKey = jsonIter.next(); @@ -219,7 +241,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant Log.d(LOG_TAG, "key = data/" + jsonKey); String value = data.getString(jsonKey); - jsonKey = normalizeKey(jsonKey); + jsonKey = normalizeKey(jsonKey, messageKey, titleKey); value = localizeKey(context, jsonKey, value); newExtras.putString(jsonKey, value); @@ -228,6 +250,10 @@ public class GCMIntentService extends GcmListenerService implements PushConstant } catch( JSONException e) { Log.e(LOG_TAG, "normalizeExtras: JSON exception"); } + } else { + String newKey = normalizeKey(key, messageKey, titleKey); + Log.d(LOG_TAG, "replace key " + key + " with " + newKey); + replaceKey(context, key, newKey, extras, newExtras); } } else if (key.equals(("notification"))) { Bundle value = extras.getBundle(key); @@ -236,7 +262,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant String notifkey = iterator.next(); Log.d(LOG_TAG, "notifkey = " + notifkey); - String newKey = normalizeKey(notifkey); + String newKey = normalizeKey(notifkey, messageKey, titleKey); Log.d(LOG_TAG, "replace key " + notifkey + " with " + newKey); String valueData = value.getString(notifkey); @@ -245,12 +271,17 @@ public class GCMIntentService extends GcmListenerService implements PushConstant newExtras.putString(newKey, valueData); } continue; + // In case we weren't working on the payload data node or the notification node, + // normalize the key. + // This allows to have "message" as the payload data key without colliding + // with the other "message" key (holding the body of the payload) + // See issue #1663 + } else { + String newKey = normalizeKey(key, messageKey, titleKey); + Log.d(LOG_TAG, "replace key " + key + " with " + newKey); + replaceKey(context, key, newKey, extras, newExtras); } - String newKey = normalizeKey(key); - Log.d(LOG_TAG, "replace key " + key + " with " + newKey); - replaceKey(context, key, newKey, extras, newExtras); - } // while return newExtras; @@ -301,15 +332,15 @@ public class GCMIntentService extends GcmListenerService implements PushConstant createNotification(context, extras); } - if(!PushPlugin.isActive() && "1".equals(forceStart)){ + if(!PushPlugin.isActive() && "1".equals(forceStart)){ Log.d(LOG_TAG, "app is not running but we should start it and put in background"); - Intent intent = new Intent(this, PushHandlerActivity.class); + Intent intent = new Intent(this, PushHandlerActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(PUSH_BUNDLE, extras); - intent.putExtra(START_IN_BACKGROUND, true); + intent.putExtra(START_IN_BACKGROUND, true); intent.putExtra(FOREGROUND, false); startActivity(intent); - } else if ("1".equals(contentAvailable)) { + } else if ("1".equals(contentAvailable)) { Log.d(LOG_TAG, "app is not running and content available true"); Log.d(LOG_TAG, "send notification event"); PushPlugin.sendExtras(extras); @@ -331,12 +362,22 @@ public class GCMIntentService extends GcmListenerService implements PushConstant int requestCode = new Random().nextInt(); PendingIntent contentIntent = PendingIntent.getActivity(this, requestCode, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); + Intent dismissedNotificationIntent = new Intent(this, PushDismissedHandler.class); + dismissedNotificationIntent.putExtra(PUSH_BUNDLE, extras); + dismissedNotificationIntent.putExtra(NOT_ID, notId); + dismissedNotificationIntent.putExtra(DISMISSED, true); + dismissedNotificationIntent.setAction(PUSH_DISMISSED); + + requestCode = new Random().nextInt(); + PendingIntent deleteIntent = PendingIntent.getBroadcast(this, requestCode, dismissedNotificationIntent, PendingIntent.FLAG_CANCEL_CURRENT); + NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setWhen(System.currentTimeMillis()) .setContentTitle(fromHtml(extras.getString(TITLE))) .setTicker(fromHtml(extras.getString(TITLE))) .setContentIntent(contentIntent) + .setDeleteIntent(deleteIntent) .setAutoCancel(true); SharedPreferences prefs = context.getSharedPreferences(PushPlugin.COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE); @@ -690,11 +731,46 @@ public class GCMIntentService extends GcmListenerService implements PushConstant } } + private Bitmap getCircleBitmap(Bitmap bitmap) { + if (bitmap == null) { + return null; + } + + final Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888); + final Canvas canvas = new Canvas(output); + final int color = Color.RED; + final Paint paint = new Paint(); + final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); + final RectF rectF = new RectF(rect); + + paint.setAntiAlias(true); + canvas.drawARGB(0, 0, 0, 0); + paint.setColor(color); + float cx = bitmap.getWidth()/2; + float cy = bitmap.getHeight()/2; + float radius = cx < cy ? cx : cy; + canvas.drawCircle(cx,cy,radius,paint); + + paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN)); + canvas.drawBitmap(bitmap, rect, rect, paint); + + bitmap.recycle(); + + return output; + } + private void setNotificationLargeIcon(Bundle extras, String packageName, Resources resources, NotificationCompat.Builder mBuilder) { String gcmLargeIcon = extras.getString(IMAGE); // from gcm + String imageType = extras.getString(IMAGE_TYPE, IMAGE_TYPE_SQUARE); if (gcmLargeIcon != null && !"".equals(gcmLargeIcon)) { if (gcmLargeIcon.startsWith("http://") || gcmLargeIcon.startsWith("https://")) { - mBuilder.setLargeIcon(getBitmapFromURL(gcmLargeIcon)); + Bitmap bitmap = getBitmapFromURL(gcmLargeIcon); + if (IMAGE_TYPE_SQUARE.equalsIgnoreCase(imageType)) { + mBuilder.setLargeIcon(bitmap); + } else { + Bitmap bm = getCircleBitmap(bitmap); + mBuilder.setLargeIcon(bm); + } Log.d(LOG_TAG, "using remote large-icon from gcm"); } else { AssetManager assetManager = getAssets(); @@ -702,7 +778,12 @@ public class GCMIntentService extends GcmListenerService implements PushConstant try { istr = assetManager.open(gcmLargeIcon); Bitmap bitmap = BitmapFactory.decodeStream(istr); - mBuilder.setLargeIcon(bitmap); + if (IMAGE_TYPE_SQUARE.equalsIgnoreCase(imageType)) { + mBuilder.setLargeIcon(bitmap); + } else { + Bitmap bm = getCircleBitmap(bitmap); + mBuilder.setLargeIcon(bm); + } Log.d(LOG_TAG, "using assets large-icon from gcm"); } catch (IOException e) { int largeIconId = 0; @@ -762,6 +843,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant try { URL url = new URL(strURL); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.setConnectTimeout(15000); connection.setDoInput(true); connection.connect(); InputStream input = connection.getInputStream(); @@ -799,4 +881,11 @@ public class GCMIntentService extends GcmListenerService implements PushConstant else return null; } + + private boolean isAvailableSender(String from) { + SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(PushPlugin.COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE); + String savedSenderID = sharedPref.getString(SENDER_ID, ""); + + return from.equals(savedSenderID) || from.startsWith("/topics/"); + } } diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PermissionUtils.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PermissionUtils.java index 6aa5c9bf..41bc6a6f 100644 --- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PermissionUtils.java +++ b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PermissionUtils.java @@ -10,8 +10,12 @@ import java.lang.reflect.Method; public class PermissionUtils { private static final String CHECK_OP_NO_THROW = "checkOpNoThrow"; + private static final int MIN_API_LEVEL = 19; // required by AppOpsManager public static boolean hasPermission(Context appContext, String appOpsServiceId) throws UnknownError { + if (android.os.Build.VERSION.SDK_INT < MIN_API_LEVEL) { + return true; + } ApplicationInfo appInfo = appContext.getApplicationInfo(); diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushConstants.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushConstants.java index 37874e04..e3aa217c 100644 --- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushConstants.java +++ b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushConstants.java @@ -3,6 +3,7 @@ package com.adobe.phonegap.push; public interface PushConstants { public static final String COM_ADOBE_PHONEGAP_PUSH = "com.adobe.phonegap.push"; public static final String REGISTRATION_ID = "registrationId"; + public static final String REGISTRATION_TYPE = "registrationType"; public static final String FOREGROUND = "foreground"; public static final String TITLE = "title"; public static final String NOT_ID = "notId"; @@ -55,10 +56,11 @@ public interface PushConstants { public static final String FROM = "from"; public static final String COLLAPSE_KEY = "collapse_key"; public static final String FORCE_SHOW = "forceShow"; - public static final String GCM = "GCM"; + public static final String FCM = "FCM"; public static final String CONTENT_AVAILABLE = "content-available"; public static final String TOPICS = "topics"; public static final String SET_APPLICATION_ICON_BADGE_NUMBER = "setApplicationIconBadgeNumber"; + public static final String GET_APPLICATION_ICON_BADGE_NUMBER = "getApplicationIconBadgeNumber"; public static final String CLEAR_ALL_NOTIFICATIONS = "clearAllNotifications"; public static final String VISIBILITY = "visibility"; public static final String INLINE_REPLY = "inlineReply"; @@ -67,6 +69,18 @@ public interface PushConstants { public static final String TWILIO_BODY = "twi_body"; public static final String TWILIO_TITLE = "twi_title"; public static final String TWILIO_SOUND = "twi_sound"; + public static final String MP_MESSAGE = "mp_message"; public static final String START_IN_BACKGROUND = "cdvStartInBackground"; public static final String FORCE_START = "force-start"; + public static final String MESSAGE_KEY = "messageKey"; + public static final String TITLE_KEY = "titleKey"; + public static final String NO_CACHE = "no-cache"; + public static final String DISMISSED = "dismissed"; + public static final String IMAGE_TYPE = "image-type"; + public static final String IMAGE_TYPE_SQUARE = "square"; + public static final String IMAGE_TYPE_CIRCLE = "circle"; + public static final String SUBJECT = "subject"; + public static final String GOOGLE_APP_ID = "google_app_id"; + public static final String GCM_DEFAULT_SENDER_ID = "gcm_defaultSenderId"; + public static final String PUSH_DISMISSED = "push_dismissed"; } diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushDismissedHandler.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushDismissedHandler.java new file mode 100644 index 00000000..a517bc1e --- /dev/null +++ b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushDismissedHandler.java @@ -0,0 +1,25 @@ +package com.adobe.phonegap.push; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; + +public class PushDismissedHandler extends BroadcastReceiver implements PushConstants { + private static String LOG_TAG = "Push_DismissedHandler"; + + @Override + public void onReceive(Context context, Intent intent) { + Bundle extras = intent.getExtras(); + FCMService fcm = new FCMService(); + String action = intent.getAction(); + int notID = intent.getIntExtra(NOT_ID, 0); + + if (action.equals(PUSH_DISMISSED)) { + Log.d(LOG_TAG, "PushDismissedHandler = " + extras); + Log.d(LOG_TAG, "not id = " + notID); + + fcm.setNotification(notID, ""); + } + } +} diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java index 23682ac8..0d399a61 100644 --- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java +++ b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushHandlerActivity.java @@ -11,7 +11,7 @@ import android.support.v4.app.RemoteInput; public class PushHandlerActivity extends Activity implements PushConstants { - private static String LOG_TAG = "PushPlugin_PushHandlerActivity"; + private static String LOG_TAG = "Push_HandlerActivity"; /* * this activity will be started if the user touches a notification that we own. @@ -21,7 +21,7 @@ public class PushHandlerActivity extends Activity implements PushConstants { */ @Override public void onCreate(Bundle savedInstanceState) { - GCMIntentService gcm = new GCMIntentService(); + FCMService gcm = new FCMService(); Intent intent = getIntent(); @@ -34,16 +34,18 @@ public class PushHandlerActivity extends Activity implements PushConstants { Log.d(LOG_TAG, "callback = " + callback); boolean foreground = getIntent().getExtras().getBoolean("foreground", true); boolean startOnBackground = getIntent().getExtras().getBoolean(START_IN_BACKGROUND, false); + boolean dismissed = getIntent().getExtras().getBoolean(DISMISSED, false); + Log.d(LOG_TAG, "dismissed = " + dismissed); if(!startOnBackground){ NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - notificationManager.cancel(GCMIntentService.getAppName(this), notId); + notificationManager.cancel(FCMService.getAppName(this), notId); } boolean isPushPluginActive = PushPlugin.isActive(); boolean inline = processPushBundle(isPushPluginActive, intent); - if(inline && android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N){ + if(inline && android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N && !startOnBackground){ foreground = true; } @@ -51,15 +53,17 @@ public class PushHandlerActivity extends Activity implements PushConstants { finish(); - Log.d(LOG_TAG, "isPushPluginActive = " + isPushPluginActive); - if (!isPushPluginActive && foreground && inline) { - Log.d(LOG_TAG, "forceMainActivityReload"); - forceMainActivityReload(false); - } else if(startOnBackground) { - Log.d(LOG_TAG, "startOnBackgroundTrue"); - forceMainActivityReload(true); - } else { - Log.d(LOG_TAG, "don't want main activity"); + if(!dismissed) { + Log.d(LOG_TAG, "isPushPluginActive = " + isPushPluginActive); + if (!isPushPluginActive && foreground && inline) { + Log.d(LOG_TAG, "forceMainActivityReload"); + forceMainActivityReload(false); + } else if(startOnBackground) { + Log.d(LOG_TAG, "startOnBackgroundTrue"); + forceMainActivityReload(true); + } else { + Log.d(LOG_TAG, "don't want main activity"); + } } } @@ -76,7 +80,9 @@ public class PushHandlerActivity extends Activity implements PushConstants { originalExtras.putBoolean(FOREGROUND, false); originalExtras.putBoolean(COLDSTART, !isPushPluginActive); + originalExtras.putBoolean(DISMISSED, extras.getBoolean(DISMISSED)); originalExtras.putString(ACTION_CALLBACK, extras.getString(CALLBACK)); + originalExtras.remove(NO_CACHE); remoteInput = RemoteInput.getResultsFromIntent(intent); if (remoteInput != null) { diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushInstanceIDListenerService.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushInstanceIDListenerService.java index eaa39a48..176b7419 100644 --- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushInstanceIDListenerService.java +++ b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushInstanceIDListenerService.java @@ -5,23 +5,22 @@ import android.content.Context; import android.content.SharedPreferences; import android.util.Log; -import com.google.android.gms.iid.InstanceID; -import com.google.android.gms.iid.InstanceIDListenerService; +import com.google.firebase.iid.FirebaseInstanceId; +import com.google.firebase.iid.FirebaseInstanceIdService; import org.json.JSONException; import java.io.IOException; -public class PushInstanceIDListenerService extends InstanceIDListenerService implements PushConstants { - public static final String LOG_TAG = "PushPlugin_PushInstanceIDListenerService"; +public class PushInstanceIDListenerService extends FirebaseInstanceIdService implements PushConstants { + public static final String LOG_TAG = "Push_InsIdService"; @Override public void onTokenRefresh() { - SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE); - String senderID = sharedPref.getString(SENDER_ID, ""); - if (!"".equals(senderID)) { - Intent intent = new Intent(this, RegistrationIntentService.class); - startService(intent); - } + // Get updated InstanceID token. + String refreshedToken = FirebaseInstanceId.getInstance().getToken(); + Log.d(LOG_TAG, "Refreshed token: " + refreshedToken); + // TODO: Implement this method to send any registration to your app's servers. + //sendRegistrationToServer(refreshedToken); } } diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushPlugin.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushPlugin.java index f6faaa2b..32f72bf3 100644 --- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushPlugin.java +++ b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/PushPlugin.java @@ -1,13 +1,14 @@ package com.adobe.phonegap.push; +import android.app.Activity; import android.app.NotificationManager; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.util.Log; -import com.google.android.gms.gcm.GcmPubSub; -import com.google.android.gms.iid.InstanceID; +import com.google.firebase.iid.FirebaseInstanceId; +import com.google.firebase.messaging.FirebaseMessaging; import org.apache.cordova.CallbackContext; import org.apache.cordova.CordovaInterface; @@ -29,7 +30,7 @@ import me.leolin.shortcutbadger.ShortcutBadger; public class PushPlugin extends CordovaPlugin implements PushConstants { - public static final String LOG_TAG = "PushPlugin"; + public static final String LOG_TAG = "Push_Plugin"; private static CallbackContext pushContext; private static CordovaWebView gWebView; @@ -59,6 +60,7 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { Log.v(LOG_TAG, "execute: data=" + data.toString()); SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE); + String token = null; String senderID = null; try { @@ -66,15 +68,19 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { Log.v(LOG_TAG, "execute: jo=" + jo.toString()); - senderID = jo.getString(SENDER_ID); + senderID = getStringResourceByName(GCM_DEFAULT_SENDER_ID); Log.v(LOG_TAG, "execute: senderID=" + senderID); - String savedSenderID = sharedPref.getString(SENDER_ID, ""); - registration_id = InstanceID.getInstance(getApplicationContext()).getToken(senderID, GCM); + token = FirebaseInstanceId.getInstance().getToken(); - if (!"".equals(registration_id)) { - JSONObject json = new JSONObject().put(REGISTRATION_ID, registration_id); + if (token == null) { + token = FirebaseInstanceId.getInstance().getToken(senderID,FCM); + } + + if (!"".equals(token)) { + JSONObject json = new JSONObject().put(REGISTRATION_ID, token); + json.put(REGISTRATION_TYPE, FCM); Log.v(LOG_TAG, "onRegistered: " + json.toString()); @@ -83,14 +89,14 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { PushPlugin.sendEvent( json ); } else { - callbackContext.error("Empty registration ID received from GCM"); + callbackContext.error("Empty registration ID received from FCM"); return; } } catch (JSONException e) { Log.e(LOG_TAG, "execute: Got JSON Exception " + e.getMessage()); callbackContext.error(e.getMessage()); } catch (IOException e) { - Log.e(LOG_TAG, "execute: Got JSON Exception " + e.getMessage()); + Log.e(LOG_TAG, "execute: Got IO Exception " + e.getMessage()); callbackContext.error(e.getMessage()); } @@ -118,6 +124,8 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { editor.putBoolean(CLEAR_NOTIFICATIONS, jo.optBoolean(CLEAR_NOTIFICATIONS, true)); editor.putBoolean(FORCE_SHOW, jo.optBoolean(FORCE_SHOW, false)); editor.putString(SENDER_ID, senderID); + editor.putString(MESSAGE_KEY, jo.optString(MESSAGE_KEY)); + editor.putString(TITLE_KEY, jo.optString(TITLE_KEY)); editor.commit(); } @@ -143,7 +151,7 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { if (topics != null && !"".equals(registration_id)) { unsubscribeFromTopics(topics, registration_id); } else { - InstanceID.getInstance(getApplicationContext()).deleteInstanceID(); + FirebaseInstanceId.getInstance().deleteInstanceId(); Log.v(LOG_TAG, "UNREGISTER"); // Remove shared prefs @@ -194,6 +202,13 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { callbackContext.success(); } }); + } else if (GET_APPLICATION_ICON_BADGE_NUMBER.equals(action)) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + Log.v(LOG_TAG, "getApplicationIconBadgeNumber"); + callbackContext.success(getApplicationIconBadgeNumber(getApplicationContext())); + } + }); } else if (CLEAR_ALL_NOTIFICATIONS.equals(action)) { cordova.getThreadPool().execute(new Runnable() { public void run() { @@ -212,8 +227,6 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { callbackContext.success(); } catch (JSONException e) { callbackContext.error(e.getMessage()); - } catch (IOException e) { - callbackContext.error(e.getMessage()); } } }); @@ -227,8 +240,6 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { callbackContext.success(); } catch (JSONException e) { callbackContext.error(e.getMessage()); - } catch (IOException e) { - callbackContext.error(e.getMessage()); } } }); @@ -259,25 +270,41 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { /* * Sends the pushbundle extras to the client application. - * If the client application isn't currently active, it is cached for later processing. + * If the client application isn't currently active and the no-cache flag is not set, it is cached for later processing. */ public static void sendExtras(Bundle extras) { if (extras != null) { + String noCache = extras.getString(NO_CACHE); if (gWebView != null) { sendEvent(convertBundleToJson(extras)); - } else { + } else if(!"1".equals(noCache)){ Log.v(LOG_TAG, "sendExtras: caching extras to send at a later time."); gCachedExtras.add(extras); } } } + /* + * Retrives badge count from SharedPreferences + */ + public static int getApplicationIconBadgeNumber(Context context){ + SharedPreferences settings = context.getSharedPreferences(BADGE, Context.MODE_PRIVATE); + return settings.getInt(BADGE, 0); + } + + /* + * Sets badge count on application icon and in SharedPreferences + */ public static void setApplicationIconBadgeNumber(Context context, int badgeCount) { if (badgeCount > 0) { ShortcutBadger.applyCount(context, badgeCount); - } else { + }else{ ShortcutBadger.removeCount(context); } + + SharedPreferences.Editor editor = context.getSharedPreferences(BADGE, Context.MODE_PRIVATE).edit(); + editor.putInt(BADGE, Math.max(badgeCount, 0)); + editor.apply(); } @Override @@ -315,23 +342,7 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { notificationManager.cancelAll(); } - /** - * Transform `topic name` to `topic path` - * Normally, the `topic` inputed from end-user is `topic name` only. - * We should convert them to GCM `topic path` - * Example: - * when topic name = 'my-topic' - * then topic path = '/topics/my-topic' - * - * @param String topic The topic name - * @return The topic path - */ - private String getTopicPath(String topic) - { - return "/topics/" + topic; - } - - private void subscribeToTopics(JSONArray topics, String registrationToken) throws IOException { + private void subscribeToTopics(JSONArray topics, String registrationToken) { if (topics != null) { String topic = null; for (int i=0; i<topics.length(); i++) { @@ -341,16 +352,10 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { } } - private void subscribeToTopic(String topic, String registrationToken) throws IOException - { - try { - if (topic != null) { - Log.d(LOG_TAG, "Subscribing to topic: " + topic); - GcmPubSub.getInstance(getApplicationContext()).subscribe(registrationToken, getTopicPath(topic), null); - } - } catch (IOException e) { - Log.e(LOG_TAG, "Failed to subscribe to topic: " + topic, e); - throw e; + private void subscribeToTopic(String topic, String registrationToken) { + if (topic != null) { + Log.d(LOG_TAG, "Subscribing to topic: " + topic); + FirebaseMessaging.getInstance().subscribeToTopic(topic); } } @@ -358,29 +363,20 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { if (topics != null) { String topic = null; for (int i=0; i<topics.length(); i++) { - try { - topic = topics.optString(i, null); - if (topic != null) { - Log.d(LOG_TAG, "Unsubscribing to topic: " + topic); - GcmPubSub.getInstance(getApplicationContext()).unsubscribe(registrationToken, getTopicPath(topic)); - } - } catch (IOException e) { - Log.e(LOG_TAG, "Failed to unsubscribe to topic: " + topic, e); + topic = topics.optString(i, null); + unsubscribeFromTopic(topic, registrationToken); + if (topic != null) { + Log.d(LOG_TAG, "Unsubscribing to topic: " + topic); + FirebaseMessaging.getInstance().unsubscribeFromTopic(topic); } } } } - private void unsubscribeFromTopic(String topic, String registrationToken) throws IOException - { - try { - if (topic != null) { - Log.d(LOG_TAG, "Unsubscribing to topic: " + topic); - GcmPubSub.getInstance(getApplicationContext()).unsubscribe(registrationToken, getTopicPath(topic)); - } - } catch (IOException e) { - Log.e(LOG_TAG, "Failed to unsubscribe to topic: " + topic, e); - throw e; + private void unsubscribeFromTopic(String topic, String registrationToken) { + if (topic != null) { + Log.d(LOG_TAG, "Unsubscribing to topic: " + topic); + FirebaseMessaging.getInstance().unsubscribeFromTopic(topic); } } @@ -413,6 +409,9 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { else if (key.equals(FOREGROUND)) { additionalData.put(key, extras.getBoolean(FOREGROUND)); } + else if (key.equals(DISMISSED)) { + additionalData.put(key, extras.getBoolean(DISMISSED)); + } else if ( value instanceof String ) { String strValue = (String)value; try { @@ -444,6 +443,13 @@ public class PushPlugin extends CordovaPlugin implements PushConstants { return null; } + private String getStringResourceByName(String aString) { + Activity activity = cordova.getActivity(); + String packageName = activity.getPackageName(); + int resId = activity.getResources().getIdentifier(aString, "string", packageName); + return activity.getString(resId); + } + public static boolean isInForeground() { return gForeground; } diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java deleted file mode 100644 index b181e88e..00000000 --- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.adobe.phonegap.push; - -import android.content.Context; - -import android.app.IntentService; -import android.content.Intent; -import android.content.SharedPreferences; -import android.util.Log; - -import com.google.android.gms.gcm.GoogleCloudMessaging; -import com.google.android.gms.iid.InstanceID; - -import java.io.IOException; - -public class RegistrationIntentService extends IntentService implements PushConstants { - public static final String LOG_TAG = "PushPlugin_RegistrationIntentService"; - - public RegistrationIntentService() { - super(LOG_TAG); - } - - @Override - protected void onHandleIntent(Intent intent) { - SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE); - - try { - InstanceID instanceID = InstanceID.getInstance(this); - String senderID = sharedPreferences.getString(SENDER_ID, ""); - String token = instanceID.getToken(senderID, - GoogleCloudMessaging.INSTANCE_ID_SCOPE, null); - PushPlugin.setRegistrationID(token); - Log.i(LOG_TAG, "new GCM Registration Token: " + token); - - } catch (Exception e) { - Log.d(LOG_TAG, "Failed to complete token refresh", e); - } - } -} diff --git a/StoneIsland/platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java b/StoneIsland/platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java deleted file mode 100755 index 7e4431df..00000000 --- a/StoneIsland/platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java +++ /dev/null @@ -1,601 +0,0 @@ -package org.apache.cordova.firebase; - -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; -import android.os.Bundle; -import android.support.v4.app.NotificationManagerCompat; -import android.util.Base64; -import android.util.Log; -import com.google.android.gms.tasks.OnCompleteListener; -import com.google.android.gms.tasks.OnFailureListener; -import com.google.android.gms.tasks.Task; -import com.google.firebase.analytics.FirebaseAnalytics; -import com.google.firebase.iid.FirebaseInstanceId; -import com.google.firebase.messaging.FirebaseMessaging; -import com.google.firebase.remoteconfig.FirebaseRemoteConfig; -import com.google.firebase.remoteconfig.FirebaseRemoteConfigInfo; -import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings; -import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue; -import com.google.firebase.crash.FirebaseCrash; -import me.leolin.shortcutbadger.ShortcutBadger; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.PluginResult; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - -public class FirebasePlugin extends CordovaPlugin { - - private FirebaseAnalytics mFirebaseAnalytics; - private final String TAG = "FirebasePlugin"; - protected static final String KEY = "badge"; - - private static boolean inBackground = true; - private static ArrayList<Bundle> notificationStack = null; - private static CallbackContext notificationCallbackContext; - private static CallbackContext tokenRefreshCallbackContext; - - @Override - protected void pluginInitialize() { - final Context context = this.cordova.getActivity().getApplicationContext(); - final Bundle extras = this.cordova.getActivity().getIntent().getExtras(); - this.cordova.getThreadPool().execute(new Runnable() { - public void run() { - Log.d(TAG, "Starting Firebase plugin"); - mFirebaseAnalytics = FirebaseAnalytics.getInstance(context); - mFirebaseAnalytics.setAnalyticsCollectionEnabled(true); - if (extras != null && extras.size() > 1) { - if (FirebasePlugin.notificationStack == null) { - FirebasePlugin.notificationStack = new ArrayList<Bundle>(); - } - if (extras.containsKey("google.message_id")) { - extras.putBoolean("tap", true); - notificationStack.add(extras); - } - } - } - }); - } - - @Override - public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { - if (action.equals("getInstanceId")) { - this.getInstanceId(callbackContext); - return true; - } else if (action.equals("getToken")) { - this.getToken(callbackContext); - return true; - } else if (action.equals("hasPermission")) { - this.hasPermission(callbackContext); - return true; - } else if (action.equals("setBadgeNumber")) { - this.setBadgeNumber(callbackContext, args.getInt(0)); - return true; - } else if (action.equals("getBadgeNumber")) { - this.getBadgeNumber(callbackContext); - return true; - } else if (action.equals("subscribe")) { - this.subscribe(callbackContext, args.getString(0)); - return true; - } else if (action.equals("unsubscribe")) { - this.unsubscribe(callbackContext, args.getString(0)); - return true; - } else if (action.equals("unregister")) { - this.unregister(callbackContext); - return true; - } else if (action.equals("onNotificationOpen")) { - this.onNotificationOpen(callbackContext); - return true; - } else if (action.equals("onTokenRefresh")) { - this.onTokenRefresh(callbackContext); - return true; - } else if (action.equals("logEvent")) { - this.logEvent(callbackContext, args.getString(0), args.getJSONObject(1)); - return true; - } else if (action.equals("logError")) { - this.logError(callbackContext, args.getString(0)); - return true; - } else if (action.equals("setScreenName")) { - this.setScreenName(callbackContext, args.getString(0)); - return true; - } else if (action.equals("setUserId")) { - this.setUserId(callbackContext, args.getString(0)); - return true; - } else if (action.equals("setUserProperty")) { - this.setUserProperty(callbackContext, args.getString(0), args.getString(1)); - return true; - } else if (action.equals("activateFetched")) { - this.activateFetched(callbackContext); - return true; - } else if (action.equals("fetch")) { - if (args.length() > 0) this.fetch(callbackContext, args.getLong(0)); - else this.fetch(callbackContext); - return true; - } else if (action.equals("getByteArray")) { - if (args.length() > 1) this.getByteArray(callbackContext, args.getString(0), args.getString(1)); - else this.getByteArray(callbackContext, args.getString(0), null); - return true; - } else if (action.equals("getValue")) { - if (args.length() > 1) this.getValue(callbackContext, args.getString(0), args.getString(1)); - else this.getValue(callbackContext, args.getString(0), null); - return true; - } else if (action.equals("getInfo")) { - this.getInfo(callbackContext); - return true; - } else if (action.equals("setConfigSettings")) { - this.setConfigSettings(callbackContext, args.getJSONObject(0)); - return true; - } else if (action.equals("setDefaults")) { - if (args.length() > 1) this.setDefaults(callbackContext, args.getJSONObject(0), args.getString(1)); - else this.setDefaults(callbackContext, args.getJSONObject(0), null); - return true; - } - return false; - } - - @Override - public void onPause(boolean multitasking) { - FirebasePlugin.inBackground = true; - } - - @Override - public void onResume(boolean multitasking) { - FirebasePlugin.inBackground = false; - } - - @Override - public void onReset() { - FirebasePlugin.notificationCallbackContext = null; - FirebasePlugin.tokenRefreshCallbackContext = null; - } - - private void onNotificationOpen(final CallbackContext callbackContext) { - FirebasePlugin.notificationCallbackContext = callbackContext; - if (FirebasePlugin.notificationStack != null) { - for (Bundle bundle : FirebasePlugin.notificationStack) { - FirebasePlugin.sendNotification(bundle); - } - FirebasePlugin.notificationStack.clear(); - } - } - - private void onTokenRefresh(final CallbackContext callbackContext) { - FirebasePlugin.tokenRefreshCallbackContext = callbackContext; - - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - String currentToken = FirebaseInstanceId.getInstance().getToken(); - - if (currentToken != null) { - FirebasePlugin.sendToken(currentToken); - } - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - public static void sendNotification(Bundle bundle) { - if (!FirebasePlugin.hasNotificationsCallback()) { - if (FirebasePlugin.notificationStack == null) { - FirebasePlugin.notificationStack = new ArrayList<Bundle>(); - } - notificationStack.add(bundle); - return; - } - final CallbackContext callbackContext = FirebasePlugin.notificationCallbackContext; - if (callbackContext != null && bundle != null) { - JSONObject json = new JSONObject(); - Set<String> keys = bundle.keySet(); - for (String key : keys) { - try { - json.put(key, bundle.get(key)); - } catch (JSONException e) { - callbackContext.error(e.getMessage()); - return; - } - } - - PluginResult pluginresult = new PluginResult(PluginResult.Status.OK, json); - pluginresult.setKeepCallback(true); - callbackContext.sendPluginResult(pluginresult); - } - } - - public static void sendToken(String token) { - if (FirebasePlugin.tokenRefreshCallbackContext == null) { - return; - } - final CallbackContext callbackContext = FirebasePlugin.tokenRefreshCallbackContext; - if (callbackContext != null && token != null) { - PluginResult pluginresult = new PluginResult(PluginResult.Status.OK, token); - pluginresult.setKeepCallback(true); - callbackContext.sendPluginResult(pluginresult); - } - } - - public static boolean inBackground() { - return FirebasePlugin.inBackground; - } - - public static boolean hasNotificationsCallback() { - return FirebasePlugin.notificationCallbackContext != null; - } - - @Override - public void onNewIntent(Intent intent) { - super.onNewIntent(intent); - final Bundle data = intent.getExtras(); - if (data != null && data.containsKey("google.message_id")) { - data.putBoolean("tap", true); - FirebasePlugin.sendNotification(data); - } - } - - // DEPRECTED - alias of getToken - private void getInstanceId(final CallbackContext callbackContext) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - String token = FirebaseInstanceId.getInstance().getToken(); - callbackContext.success(token); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void getToken(final CallbackContext callbackContext) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - String token = FirebaseInstanceId.getInstance().getToken(); - callbackContext.success(token); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void hasPermission(final CallbackContext callbackContext) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - Context context = cordova.getActivity(); - NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context); - boolean areNotificationsEnabled = notificationManagerCompat.areNotificationsEnabled(); - JSONObject object = new JSONObject(); - object.put("isEnabled", areNotificationsEnabled); - callbackContext.success(object); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void setBadgeNumber(final CallbackContext callbackContext, final int number) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - Context context = cordova.getActivity(); - SharedPreferences.Editor editor = context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit(); - editor.putInt(KEY, number); - editor.apply(); - ShortcutBadger.applyCount(context, number); - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void getBadgeNumber(final CallbackContext callbackContext) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - Context context = cordova.getActivity(); - SharedPreferences settings = context.getSharedPreferences(KEY, Context.MODE_PRIVATE); - int number = settings.getInt(KEY, 0); - callbackContext.success(number); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void subscribe(final CallbackContext callbackContext, final String topic) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - FirebaseMessaging.getInstance().subscribeToTopic(topic); - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void unsubscribe(final CallbackContext callbackContext, final String topic) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - FirebaseMessaging.getInstance().unsubscribeFromTopic(topic); - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void unregister(final CallbackContext callbackContext) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - FirebaseInstanceId.getInstance().deleteInstanceId(); - String currentToken = FirebaseInstanceId.getInstance().getToken(); - if (currentToken != null) { - FirebasePlugin.sendToken(currentToken); - } - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void logEvent(final CallbackContext callbackContext, final String name, final JSONObject params) throws JSONException { - final Bundle bundle = new Bundle(); - Iterator iter = params.keys(); - while (iter.hasNext()) { - String key = (String) iter.next(); - Object value = params.get(key); - - if (value instanceof Integer || value instanceof Double) { - bundle.putFloat(key, ((Number) value).floatValue()); - } else { - bundle.putString(key, value.toString()); - } - } - - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - mFirebaseAnalytics.logEvent(name, bundle); - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void logError(final CallbackContext callbackContext, final String message) throws JSONException { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - FirebaseCrash.report(new Exception(message)); - callbackContext.success(1); - } catch (Exception e) { - FirebaseCrash.log(e.getMessage()); - e.printStackTrace(); - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void setScreenName(final CallbackContext callbackContext, final String name) { - // This must be called on the main thread - cordova.getActivity().runOnUiThread(new Runnable() { - public void run() { - try { - mFirebaseAnalytics.setCurrentScreen(cordova.getActivity(), name, null); - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void setUserId(final CallbackContext callbackContext, final String id) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - mFirebaseAnalytics.setUserId(id); - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void setUserProperty(final CallbackContext callbackContext, final String name, final String value) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - mFirebaseAnalytics.setUserProperty(name, value); - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void activateFetched(final CallbackContext callbackContext) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - final boolean activated = FirebaseRemoteConfig.getInstance().activateFetched(); - callbackContext.success(String.valueOf(activated)); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void fetch(CallbackContext callbackContext) { - fetch(callbackContext, FirebaseRemoteConfig.getInstance().fetch()); - } - - private void fetch(CallbackContext callbackContext, long cacheExpirationSeconds) { - fetch(callbackContext, FirebaseRemoteConfig.getInstance().fetch(cacheExpirationSeconds)); - } - - private void fetch(final CallbackContext callbackContext, final Task<Void> task) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - task.addOnCompleteListener(new OnCompleteListener<Void>() { - @Override - public void onComplete(Task<Void> task) { - callbackContext.success(); - } - }).addOnFailureListener(new OnFailureListener() { - @Override - public void onFailure(Exception e) { - callbackContext.error(e.getMessage()); - } - }); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void getByteArray(final CallbackContext callbackContext, final String key, final String namespace) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - byte[] bytes = namespace == null ? FirebaseRemoteConfig.getInstance().getByteArray(key) - : FirebaseRemoteConfig.getInstance().getByteArray(key, namespace); - JSONObject object = new JSONObject(); - object.put("base64", Base64.encodeToString(bytes, Base64.DEFAULT)); - object.put("array", new JSONArray(bytes)); - callbackContext.success(object); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void getValue(final CallbackContext callbackContext, final String key, final String namespace) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - FirebaseRemoteConfigValue value = namespace == null ? FirebaseRemoteConfig.getInstance().getValue(key) - : FirebaseRemoteConfig.getInstance().getValue(key, namespace); - callbackContext.success(value.asString()); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void getInfo(final CallbackContext callbackContext) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - FirebaseRemoteConfigInfo remoteConfigInfo = FirebaseRemoteConfig.getInstance().getInfo(); - JSONObject info = new JSONObject(); - - JSONObject settings = new JSONObject(); - settings.put("developerModeEnabled", remoteConfigInfo.getConfigSettings().isDeveloperModeEnabled()); - info.put("configSettings", settings); - - info.put("fetchTimeMillis", remoteConfigInfo.getFetchTimeMillis()); - info.put("lastFetchStatus", remoteConfigInfo.getLastFetchStatus()); - - callbackContext.success(info); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void setConfigSettings(final CallbackContext callbackContext, final JSONObject config) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - boolean devMode = config.getBoolean("developerModeEnabled"); - FirebaseRemoteConfigSettings.Builder settings = new FirebaseRemoteConfigSettings.Builder() - .setDeveloperModeEnabled(devMode); - FirebaseRemoteConfig.getInstance().setConfigSettings(settings.build()); - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private void setDefaults(final CallbackContext callbackContext, final JSONObject defaults, final String namespace) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - if (namespace == null) - FirebaseRemoteConfig.getInstance().setDefaults(defaultsToMap(defaults)); - else - FirebaseRemoteConfig.getInstance().setDefaults(defaultsToMap(defaults), namespace); - callbackContext.success(); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - - private static Map<String, Object> defaultsToMap(JSONObject object) throws JSONException { - final Map<String, Object> map = new HashMap<String, Object>(); - - for (Iterator<String> keys = object.keys(); keys.hasNext(); ) { - String key = keys.next(); - Object value = object.get(key); - - if (value instanceof Integer) { - //setDefaults() should take Longs - value = new Long((Integer) value); - } else if (value instanceof JSONArray) { - JSONArray array = (JSONArray) value; - if (array.length() == 1 && array.get(0) instanceof String) { - //parse byte[] as Base64 String - value = Base64.decode(array.getString(0), Base64.DEFAULT); - } else { - //parse byte[] as numeric array - byte[] bytes = new byte[array.length()]; - for (int i = 0; i < array.length(); i++) - bytes[i] = (byte) array.getInt(i); - value = bytes; - } - } - - map.put(key, value); - } - return map; - } -} diff --git a/StoneIsland/platforms/android/src/org/apache/cordova/firebase/FirebasePluginInstanceIDService.java b/StoneIsland/platforms/android/src/org/apache/cordova/firebase/FirebasePluginInstanceIDService.java deleted file mode 100755 index 96140f02..00000000 --- a/StoneIsland/platforms/android/src/org/apache/cordova/firebase/FirebasePluginInstanceIDService.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.apache.cordova.firebase; - -import android.util.Log; - -import com.google.firebase.iid.FirebaseInstanceId; -import com.google.firebase.iid.FirebaseInstanceIdService; - - -public class FirebasePluginInstanceIDService extends FirebaseInstanceIdService { - - private static final String TAG = "FirebasePlugin"; - - /** - * Called if InstanceID token is updated. This may occur if the security of - * the previous token had been compromised. Note that this is called when the InstanceID token - * is initially generated so this is where you would retrieve the token. - */ - @Override - public void onTokenRefresh() { - // Get updated InstanceID token. - String refreshedToken = FirebaseInstanceId.getInstance().getToken(); - Log.d(TAG, "Refreshed token: " + refreshedToken); - - FirebasePlugin.sendToken(refreshedToken); - } -} diff --git a/StoneIsland/platforms/android/src/org/apache/cordova/firebase/FirebasePluginMessagingService.java b/StoneIsland/platforms/android/src/org/apache/cordova/firebase/FirebasePluginMessagingService.java deleted file mode 100755 index a42ce60e..00000000 --- a/StoneIsland/platforms/android/src/org/apache/cordova/firebase/FirebasePluginMessagingService.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.apache.cordova.firebase; - -import android.app.NotificationManager; -import android.app.PendingIntent; -import android.content.Context; -import android.content.Intent; -import android.media.RingtoneManager; -import android.net.Uri; -import android.os.Bundle; -import android.support.v4.app.NotificationCompat; -import android.util.Log; -import android.app.Notification; -import android.text.TextUtils; - -import com.google.firebase.messaging.FirebaseMessagingService; -import com.google.firebase.messaging.RemoteMessage; - -import java.util.Map; -import java.util.Random; - -public class FirebasePluginMessagingService extends FirebaseMessagingService { - - private static final String TAG = "FirebasePlugin"; - - /** - * Called when message is received. - * - * @param remoteMessage Object representing the message received from Firebase Cloud Messaging. - */ - @Override - public void onMessageReceived(RemoteMessage remoteMessage) { - // [START_EXCLUDE] - // There are two types of messages data messages and notification messages. Data messages are handled - // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type - // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app - // is in the foreground. When the app is in the background an automatically generated notification is displayed. - // When the user taps on the notification they are returned to the app. Messages containing both notification - // and data payloads are treated as notification messages. The Firebase console always sends notification - // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options - // [END_EXCLUDE] - - // TODO(developer): Handle FCM messages here. - // Not getting messages here? See why this may be: https://goo.gl/39bRNJ - String title; - String text; - String id; - if (remoteMessage.getNotification() != null) { - title = remoteMessage.getNotification().getTitle(); - text = remoteMessage.getNotification().getBody(); - id = remoteMessage.getMessageId(); - } else { - title = remoteMessage.getData().get("title"); - text = remoteMessage.getData().get("text"); - id = remoteMessage.getData().get("id"); - } - - if(TextUtils.isEmpty(id)){ - Random rand = new Random(); - int n = rand.nextInt(50) + 1; - id = Integer.toString(n); - } - - Log.d(TAG, "From: " + remoteMessage.getFrom()); - Log.d(TAG, "Notification Message id: " + id); - Log.d(TAG, "Notification Message Title: " + title); - Log.d(TAG, "Notification Message Body/Text: " + text); - - // TODO: Add option to developer to configure if show notification when app on foreground - if (!TextUtils.isEmpty(text) || !TextUtils.isEmpty(title) || (!remoteMessage.getData().isEmpty())) { - boolean showNotification = (FirebasePlugin.inBackground() || !FirebasePlugin.hasNotificationsCallback()) && (!TextUtils.isEmpty(text) || !TextUtils.isEmpty(title)); - sendNotification(id, title, text, remoteMessage.getData(), showNotification); - } - } - - private void sendNotification(String id, String title, String messageBody, Map<String, String> data, boolean showNotification) { - Bundle bundle = new Bundle(); - for (String key : data.keySet()) { - bundle.putString(key, data.get(key)); - } - if (showNotification) { - Intent intent = new Intent(this, OnNotificationOpenReceiver.class); - intent.putExtras(bundle); - PendingIntent pendingIntent = PendingIntent.getBroadcast(this, id.hashCode(), intent, - PendingIntent.FLAG_UPDATE_CURRENT); - - Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); - NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) - .setContentTitle(title) - .setContentText(messageBody) - .setVisibility(NotificationCompat.VISIBILITY_PUBLIC) - .setStyle(new NotificationCompat.BigTextStyle().bigText(messageBody)) - .setAutoCancel(true) - .setSound(defaultSoundUri) - .setContentIntent(pendingIntent); - - int resID = getResources().getIdentifier("notification_icon", "drawable", getPackageName()); - if (resID != 0) { - notificationBuilder.setSmallIcon(resID); - } else { - notificationBuilder.setSmallIcon(getApplicationInfo().icon); - } - - if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) - { - int accentID = getResources().getIdentifier("accent", "color", getPackageName()); - notificationBuilder.setColor(getResources().getColor(accentID, null)); - } - - Notification notification = notificationBuilder.build(); - if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){ - int iconID = android.R.id.icon; - int notiID = getResources().getIdentifier("notification_big", "drawable", getPackageName()); - if (notification.contentView != null) { - notification.contentView.setImageViewResource(iconID, notiID); - } - } - NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - - notificationManager.notify(id.hashCode(), notification); - } else { - bundle.putBoolean("tap", false); - bundle.putString("title", title); - bundle.putString("body", messageBody); - FirebasePlugin.sendNotification(bundle); - } - } -} diff --git a/StoneIsland/platforms/android/src/org/apache/cordova/firebase/OnNotificationOpenReceiver.java b/StoneIsland/platforms/android/src/org/apache/cordova/firebase/OnNotificationOpenReceiver.java deleted file mode 100644 index a7f63757..00000000 --- a/StoneIsland/platforms/android/src/org/apache/cordova/firebase/OnNotificationOpenReceiver.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.apache.cordova.firebase; - -import android.app.PendingIntent; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.os.Bundle; - -public class OnNotificationOpenReceiver extends BroadcastReceiver { - - @Override - public void onReceive(Context context, Intent intent) { - PackageManager pm = context.getPackageManager(); - Intent launchIntent = pm.getLaunchIntentForPackage(context.getPackageName()); - - launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); - Bundle data = intent.getExtras(); - data.putBoolean("tap", true); - FirebasePlugin.sendNotification(data); - launchIntent.putExtras(data); - context.startActivity(launchIntent); - } -} diff --git a/StoneIsland/platforms/android/wrapper.gradle b/StoneIsland/platforms/android/wrapper.gradle new file mode 100644 index 00000000..d7ebabd7 --- /dev/null +++ b/StoneIsland/platforms/android/wrapper.gradle @@ -0,0 +1 @@ +//This file is intentionally just a comment |
