Browse Source

add vibration package

Carsten Porth 5 years ago
parent
commit
e5f6159704
4 changed files with 20 additions and 4 deletions
  1. 1 0
      app/config.xml
  2. 11 1
      app/package-lock.json
  3. 5 2
      app/package.json
  4. 3 1
      app/src/app/app.module.ts

+ 1 - 0
app/config.xml

@@ -101,5 +101,6 @@
         <variable name="ANDROID_SUPPORT_V4_VERSION" value="24.1.1+" />
     </plugin>
     <plugin name="com-sarriaroman-photoviewer" spec="1.1.18" />
+    <plugin name="cordova-plugin-vibration" spec="3.1.0" />
     <engine name="android" spec="^7.1.4" />
 </widget>

+ 11 - 1
app/package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "HybridOSN",
-  "version": "0.2.0",
+  "version": "0.4.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -322,6 +322,11 @@
       "resolved": "https://registry.npmjs.org/@ionic-native/status-bar/-/status-bar-4.8.0.tgz",
       "integrity": "sha512-mNtE7HI7W7TydIJaux48G3Lp9BEH2Hx+RWPySfmH3bwl7yeytvXzlKPPCYbpphBlRhIKYp5v3hepM7Ufuo3+9A=="
     },
+    "@ionic-native/vibration": {
+      "version": "4.8.0",
+      "resolved": "https://registry.npmjs.org/@ionic-native/vibration/-/vibration-4.8.0.tgz",
+      "integrity": "sha512-nF7NAw2L3FX1tLbWOGe7awuXeN10ZrgxYpwJZdct2egMLUr4ERL82ymYnEpb7g5vcatEtx0YqriRc+IWZKyjZA=="
+    },
     "@ionic/app-scripts": {
       "version": "3.2.1",
       "resolved": "https://registry.npmjs.org/@ionic/app-scripts/-/app-scripts-3.2.1.tgz",
@@ -1609,6 +1614,11 @@
       "resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.2.tgz",
       "integrity": "sha1-dH509W4gHNWFvGLRS8oZ9oZ/8e0="
     },
+    "cordova-plugin-vibration": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/cordova-plugin-vibration/-/cordova-plugin-vibration-3.1.0.tgz",
+      "integrity": "sha1-Y+V6HecuMYsJRO9yfXxO/xPKLJM="
+    },
     "cordova-plugin-whitelist": {
       "version": "1.3.3",
       "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.3.tgz",

+ 5 - 2
app/package.json

@@ -27,6 +27,7 @@
     "@ionic-native/social-sharing": "^4.18.0",
     "@ionic-native/splash-screen": "4.8.0",
     "@ionic-native/status-bar": "4.8.0",
+    "@ionic-native/vibration": "^4.8.0",
     "@ionic/storage": "2.1.3",
     "@types/twitter-text": "^2.0.0",
     "com-sarriaroman-photoviewer": "1.1.18",
@@ -40,6 +41,7 @@
     "cordova-plugin-ionic-webview": "^1.2.1",
     "cordova-plugin-secure-storage": "^2.6.8",
     "cordova-plugin-splashscreen": "^5.0.2",
+    "cordova-plugin-vibration": "3.1.0",
     "cordova-plugin-whitelist": "^1.3.3",
     "cordova-plugin-x-socialsharing": "5.4.3",
     "cordova-support-android-plugin": "^1.0.1",
@@ -78,10 +80,11 @@
       "cordova-plugin-x-socialsharing": {
         "ANDROID_SUPPORT_V4_VERSION": "24.1.1+"
       },
-      "com-sarriaroman-photoviewer": {}
+      "com-sarriaroman-photoviewer": {},
+      "cordova-plugin-vibration": {}
     },
     "platforms": [
       "android"
     ]
   }
-}
+}

+ 3 - 1
app/src/app/app.module.ts

@@ -7,6 +7,7 @@ import { HttpClient, HttpClientModule } from "@angular/common/http";
 import { IonicStorageModule } from "@ionic/storage";
 import { SocialSharing } from "@ionic-native/social-sharing";
 import { PhotoViewer } from "@ionic-native/photo-viewer";
+import { Vibration } from "@ionic-native/vibration";
 
 import { AuthProvider } from "../providers/auth/auth";
 
@@ -96,7 +97,8 @@ import { CryptoProvider } from "../providers/crypto/crypto";
     P2pStorageIpfsProvider,
     P2pDatabaseGunProvider,
     FeedProvider,
-    CryptoProvider
+    CryptoProvider,
+    Vibration
   ]
 })
 export class AppModule {}