plugins in phonegap plugins.pdf · phonegap-plugin-push 17.008 receive and handle native push...
TRANSCRIPT
![Page 1: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/1.jpg)
Plugins in PhoneGap
User-group meeting
26/04/2016
Michiel Willocx
![Page 2: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/2.jpg)
Table of content
• Introduction
• The internals of a PhoneGap plugin
• The PhoneGap Plugin Store
• Performance of PhoneGap plugins (case study: data storage)
• Security of PhoneGap plugins (case study: hot code updates)
![Page 3: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/3.jpg)
Web Apps
Web-To-Native
WrappersSource Code
Translator
Application
Code
Runtime
Environment
Operating
System
Runtimes
1) Based on web technology 2) Not based on Web technology
Introduction
![Page 4: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/4.jpg)
![Page 5: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/5.jpg)
![Page 6: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/6.jpg)
Add PhoneGap plugins to your application
$ cd <location main folder of PhoneGap project>
$ cordova plugin add https://github.com/<plugin name>
![Page 7: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/7.jpg)
The internals of a PhoneGap plugin
• Example: media capture plugin
• Captures:
o Audio
o Images
o Video
![Page 8: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/8.jpg)
// capture callbackvar captureSuccess = function(mediaFiles) {
var i, path, len;for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles[i].fullPath;// do something interesting with the file
}};
// capture error callbackvar captureError = function(error) {
navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');};
// start audio capturenavigator.device.capture.captureAudio(captureSuccess, captureError, {limit:2});
Code Example
![Page 9: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/9.jpg)
The internals of a PhoneGap plugin
![Page 10: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/10.jpg)
plugin.xml
Contains all plugin settings
![Page 11: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/11.jpg)
plugin.xml
All JavaScript files included in
the plugin.
![Page 12: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/12.jpg)
plugin.xml
Platform specific settings
In Android:
• Permissions required by the plugin
• Included Java files
is copied to Android Manifest
Analogous, iOS
configurations are
copied to Info.plist,
and Windows Phone
configurations to
WMAppManifest.xml
![Page 13: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/13.jpg)
www folder
![Page 14: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/14.jpg)
JavaScript file
Functions, available for the
developer to use in the
PhoneGap application
![Page 15: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/15.jpg)
src folder
![Page 16: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/16.jpg)
Android Source
…
![Page 17: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/17.jpg)
PhoneGap Plugin Store
![Page 18: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/18.jpg)
PhoneGap Plugin Store
http://cordova.apache.org/plugins/
![Page 19: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/19.jpg)
Featured/Core Plugins
• Basic device plugins provided by PhoneGap/Cordova
• Geolocation
• Globalization
• InAppBrowser
• Keyboard
• Media
• Dialogs (Notification)
• SplashScreen
• StatusBar
• Vibration
• Whitelist
• (Whitelist legacy version)
• Device Motion (Accelerometer)
• Battery Status
• Camera
• Media Capture (Capture)
• Device Orientation (Compass)
• Network Information (Connection)
• Console
• Contacts
• Device
• File (FileSystem)
• File Transfer
Totaal: 21(+1)
![Page 20: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/20.jpg)
The PhoneGap Plugin Store: An overview
![Page 21: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/21.jpg)
Analysis Method:
• Collecting information about each plugin in the store
• Selenium with Firefox in Java
• Download and analyze each plugin
• Download: Shell script
• Analyze: Java program
![Page 22: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/22.jpg)
Overview of the PhoneGap Plugin Store
• Plugin store is growing fast
February Now
# Plugins ± 950 ± 1150
# Developers ± 450 ± 500
![Page 23: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/23.jpg)
Platform Coverage of the Plugins
Average for all plugins:
• Coverage of 1,7-1,8 platforms per plugin
< 2 platforms
Android iOS WP Blackberry Ubuntu Firefoxos Fireos
# Plugins 810 732 168 123 63 44 79
% Plugins 71% 64% 15% 11% 6% 4% 7%
![Page 24: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/24.jpg)
Platform Coverage of the Plugins
Some more stats
961 84% Support at least one of the 3 main platforms
157 14% Support all 3 main platforms
587 51% Support Android and iOS
• Coverage remains at 1,7-1,8 platforms per plugin
0
50
100
150
200
250
300
350
400
450
500
1 2 3
AmountofSupportedplatforms
![Page 25: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/25.jpg)
Downloads of Plugins
Most downloaded : Whitelist plugin (see later this presentation)
0
100
200
300
400
500
600
700
800
0-10 10-100 100-1000 1000-10.000 10.000-100.000 More
AmountofdownloadsforPhoneGapPlugins(LastMonth)
Mostly featured plugins
![Page 26: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/26.jpg)
Most popular non-featured PluginsPlugin name #Downloads What?
cordova-ios 92.897allows Cordova-based projects to be built for the iOS Platform
ionic-plugin-keyboard 72.587Easy interaction with the keyboard (hide, show,…)
com.instafeez.cordova 38.350 integration for Razorpay checkout
cordova-plugin-baidupush 34.811 baidu push = chinese cloud service
com.shahidachmat.intermec.scanner 23.777 barcode scanner
phonegap-plugin-push 17.008 Receive and handle native push notifications
cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android)
cordova-camera-custom 10.258 allows camera interaction from html code
cordova-plugin-x-socialsharing 8.300 Share text, images,… via the native sharing widget
cordova-plugin-x-toast 6.119 show a Toast
![Page 27: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/27.jpg)
CrossWalk Webview for Android
![Page 28: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/28.jpg)
Recently: Crosswalk also available on iOS
![Page 29: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/29.jpg)
Plugin Updates
0
50
100
150
200
250
300
<1month <3months <6months <9months <1year >1year
LastUpdateforPhoneGapPlugins • Most plugins are
frequently updated
• Many non-updated
plugins are submitted by
the same programmer
• “All” plugins were
updated last year
• Most featured plugins
are frequently updated
![Page 30: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/30.jpg)
Plugin Updates
Plugin Name AuthorLast
UpdatedDownloads Last
MonthAmount of Commits
Amountof Issues
Amountof stars
cordova-plugin-okhttp agrieve 384 117 4 1 4
cordova-plugin-service-worker maxw 368 45 137 6 45
cobweb-camera-va-plugin panterz 355 17 12 0 0
cobweb-los-plugin panterz 355 10 12 0 0
cordova-plugin-websql-async dickvdbrink 349 43 43 9 4
cordova-plugin-android-support-v4 floatinghotpot 348 1.270 2 0 2
cordova-plugin-paypalmpl floatinghotpot 348 35 19 5 3
cordova-plugin-mobfox floatinghotpot 348 26 28 6 10
cordova-plugin-smartadserver floatinghotpot 348 9 15 0 4
cordova-plugin-iflyspeech floatinghotpot 348 8 4 1 18
cordova-plugin-wifi floatinghotpot 347 91 6 4 8
cordova-plugin-android-support-v7-appcompat floatinghotpot 347 23 1 0 0
cordova-plugin-appleiap floatinghotpot 347 11 16 1 13
cordova-plugin-barcodescanner hypery2k 346 943 170 6 10
![Page 31: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/31.jpg)
How to update a Cordova plugin in a PhoneGap app
• PhoneGap Plugins are not automatically updated!
• Manually remove and add the plugin again:
$ cordova plugin rm https://github.com/apache/cordova-plugin-camera
$ cordova plugin add https://github.com/apache/cordova-plugin-camera
Plugin updated in the Plugin Store ≠ Plugin updated in your application
![Page 32: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/32.jpg)
Android permissionsandroid.permission.INTERNET 177
android.permission.ACCESS_NETWORK_STATE 161
android.permission.WRITE_EXTERNAL_STORAGE 116
android.permission.WAKE_LOCK 66
android.permission.ACCESS_COARSE_LOCATION 62
android.permission.ACCESS_FINE_LOCATION 60
android.permission.VIBRATE 51
com.google.android.c2dm.permission.RECEIVE 50
android.permission.READ_PHONE_STATE 47
$PACKAGE_NAME.permission.C2D_MESSAGE 42
android.permission.ACCESS_WIFI_STATE 41
android.permission.RECORD_AUDIO 35
android.permission.GET_ACCOUNTS 29
android.permission.RECEIVE_BOOT_COMPLETED 29
android.permission.BLUETOOTH 26
android.permission.READ_EXTERNAL_STORAGE 26
android.permission.BLUETOOTH_ADMIN 22
android.permission.CAMERA 22
android.permission.MODIFY_AUDIO_SETTINGS 18
android.permission.CHANGE_WIFI_STATE 9
![Page 33: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/33.jpg)
Android permissions
github.com/Lancezh/cordova-plugin-qtpaysdk 18
github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin 17
github.com/Code1Tech/phonegap-plugin-push 14
github.com/Kandy-IO/kandy-phonegap 14
github.com/cranberrygame/cordova-plugin-ad-admob-inmobi 13
github.com/rongcloud/cordova-plugin-rongcloud-im 12
github.com/mrwutong/cordova-qdc-baidu-push 12
github.com/EtherZhou/baidupush 10
github.com/Donky-Network/cordova-plugin-donky-core 10
github.com/Donky-Network/cordova-plugin-donky-push 10
github.com/mobiletools/context-sensing-cordova 10
![Page 34: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/34.jpg)
github.com/Lancezh/cordova-plugin-qtpaysdk
android.permission.ACCESS_NETWORK_STATE
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.WAKE_LOCK
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_FINE_LOCATION
android.permission.VIBRATE
android.permission.READ_PHONE_STATE
android.permission.ACCESS_WIFI_STATE
android.permission.RECORD_AUDIO
android.permission.BLUETOOTH
android.permission.READ_EXTERNAL_STORAGE
android.permission.BLUETOOTH_ADMIN
android.permission.CHANGE_WIFI_STATE
android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
android.permission.DISABLE_KEYGUARD
android.permission.SYSTEM_ALERT_WINDOW
android.permission.BROADCAST_STICKY
![Page 35: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/35.jpg)
Pushwoosh/pushwoosh-
phonegap-3.0-plugin
![Page 36: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/36.jpg)
What do PhoneGap Plugins offer?
“There is a plugin
for everything”
![Page 37: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/37.jpg)
What do PhoneGap Plugins offer?
• Featured/Core PhoneGap plugins provide basic device features
• Geolocation
• Globalization
• InAppBrowser
• Keyboard
• Media
• Dialogs (Notification)
• SplashScreen
• StatusBar
• Vibration
• Whitelist
• (Whitelist legacy version)
• Device Motion (Accelerometer)
• Battery Status
• Camera
• Media Capture (Capture)
• Device Orientation (Compass)
• Network Information (Connection)
• Console
• Contacts
• Device
• File (FileSystem)
• File Transfer
![Page 38: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/38.jpg)
User interface
![Page 39: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/39.jpg)
User interface
![Page 40: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/40.jpg)
User interface
![Page 41: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/41.jpg)
Security
Storage
![Page 42: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/42.jpg)
Social networks
![Page 43: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/43.jpg)
Payment
• In app purchases
![Page 44: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/44.jpg)
Payment related
• PayPal
![Page 45: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/45.jpg)
Other
• Push notifications
![Page 46: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/46.jpg)
Other
• Update JavaScript code of the PhoneGap application
o Update without the app store
![Page 47: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/47.jpg)
Alternatives for the PhoneGap Plugin Store
Most JavaScript Frameworks have a custom plugin store
• Some plugins are also in the main PhoneGap plugin store
• Also paid plugins
![Page 48: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/48.jpg)
Alternatives for the PhoneGap Plugin Store: Examples
Ionic
• >100 plugins
• Free and paid
• Only 19 Ionic plugins in the
PhoneGap Plugin store
![Page 49: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/49.jpg)
•
Alternatives for the PhoneGap Plugin Store: Examples
![Page 50: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/50.jpg)
Alternatives for the PhoneGap Plugin Store: Examples
jQuery Mobile
• >500 free JavaScript plugins
(Plugins which don’t require a
JavaScript bridge)
![Page 51: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/51.jpg)
Performance of PhoneGap Plugins
Case study: Data Storage
![Page 52: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/52.jpg)
Case Study: Data Storage
Database Storage
Store 100 books, request
all books, delete 50
books and finaly request
all books again
File Storage
Storing and retrieving file
contents native and
through Cordova
Key-Value Pairs
Save and retrieve a
string (1000 iterations)
![Page 53: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/53.jpg)
Storage strategies in Cordova
Storageimplementations Androiddevice
iOSdevice
Database
WebSQL ■ ■
IndexedDB þ ý
SQLite(plugin) þ þ
File FileAPI(plugin) þ þ
Variables
LocalStorage þ þ
NativeStorage þ þ
Not supported
Supported
■ Deprecated (but supported)
![Page 54: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/54.jpg)
NativeStorage vs classic LocalStorage
NativeStorage LocalStorage
Plugin HTML5
Executed on the native side Executed in the webview
Guaranteed persistent storage NO guaranteed persistent storage
All primitive types (string, int,
double, boolean) and objects(!)
Only strings
https://www.npmjs.com/package/cordova-plugin-nativestorage
![Page 55: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/55.jpg)
Database performance
Store 100 books, request
all books, delete 50
books and finaly request
all books again
SQLiteWebSQLSQLite PluginIndexedDB SQLite
![Page 56: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/56.jpg)
SQLite
WebSQL
SQLite Plugin
IndexedDB
Duration of
total operation
time
97 1398 1855 2140(ms)
Database performance [Android]
![Page 57: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/57.jpg)
SQLite
WebSQLSQLite Plugin
Duration of
total operation
time
1925 2235 2467(ms)
Database performance [iOS]
![Page 58: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/58.jpg)
File storage performance
Storing and retrieving file
contents native and
through Cordova
SQLite SQLite
File API (plugin)
https://github.com/apache/cordova-plugin-file
![Page 59: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/59.jpg)
File storage performance [Android]
0
500
1000
1500
2000
2500
3000
3500
4000
4500
0 5 10 15 20
Rea
d/W
rite
du
rati
on
(ms)
File volume (Mb)
Cordova Write
Cordova Read
Android Read
Android Write
![Page 60: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/60.jpg)
Read overhead in Cordova Android
Native read
Cordova Read Overhead
Get JS message
(our text)
Resolve to local URL
![Page 61: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/61.jpg)
Cordova Write Overhead
Write overhead in Cordova Android
JS Processing command
Execute call delay
Blob creation
Native write
A blob
represents a
byte sequence
![Page 62: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/62.jpg)
File storage performance [iOS]
https://github.com/apache/cordova-plugin-file
0
1000
2000
3000
4000
5000
6000
7000
8000
0 2 4 6 8 10 12
Rea
d/W
rite
Du
rati
on
(m
s)
Read/Write volume (MB)
Cordova vs iOS (iphone 6 [9.2])
iOS Read
iOS Write
Cordova iOS Read
Cordova iOS Write
![Page 63: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/63.jpg)
Read overhead in Cordova iOS
Native read
Cordova Read Overhead
Send over bridge
Convert to JSONArray
![Page 64: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/64.jpg)
Cordova Write Overhead
Write overhead in Cordova iOS
JS Processing command
Blob creation
Native write
![Page 65: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/65.jpg)
Key-value storage performance
SharedPreferencesNativeStorage (plugin)localStorage NSuserDefaults
Save and retrieve a
string (1000 iterations)
Plists
https://www.npmjs.com/package/cordova-plugin-nativestorage
![Page 66: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/66.jpg)
Key-value storage performance
GET: <1 ms for all implementations
SET: <1 ms for all implementations, except NativeStorage (1,8 ms)
GET: <1 ms for all implementations
SET: <1 ms for all implementations
Cordova overhead +
asynchronous
![Page 67: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/67.jpg)
Plugins and Security
![Page 68: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/68.jpg)
Plugins and Security
The resource could not be loaded because the App Transport Security
policy requires the use of a secure connection.
Intro
![Page 69: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/69.jpg)
![Page 70: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/70.jpg)
![Page 71: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/71.jpg)
![Page 72: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/72.jpg)
![Page 73: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/73.jpg)
Whitelist Plugin
• Featured PhoneGap Plugin
• Automatically added to each PhoneGap project
![Page 74: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/74.jpg)
![Page 75: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/75.jpg)
![Page 76: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/76.jpg)
Adaptation of the whitelist plugin
Mohamed Shehab and Abeer AlJarrah. 2014. Reducing Attack Surface on Cordova-based Hybrid Mobile Apps. In Proceedings
of the 2nd International Workshop on Mobile Development Lifecycle (MobileDeLi '14). ACM, New York, NY, USA, 1-8.
60 % of PhoneGap apps grants open access to all domains
Personal experience: it’s probably even worse…
![Page 77: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/77.jpg)
History of the whitelist plugin
• Cordova Whitelist doesn’t work
o On Android API 10 and below (=2.3.3 Gingerbread)
o On Windows Phone 8 for iframes and XMLHttpRequest
o On Cordova versions below 2.9
example.com whitelisted example.com.evil.com also accepted
![Page 78: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/78.jpg)
Hot code update plugins
• Allow PhoneGap applications to be updated without the app store
![Page 79: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/79.jpg)
Hot code update plugins
APK
Webview
…Assets
WWW …
……
Updated www
<Location outside of the APK>
![Page 80: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/80.jpg)
Meteor-cordova-update-plugin
![Page 81: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/81.jpg)
Meteor Todo App
![Page 82: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/82.jpg)
Man-In-The-Middle Attack
iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 80 -j
DNAT --to 192.168.1.100:8080
![Page 83: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/83.jpg)
Man-In-The-Middle Attack
![Page 84: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/84.jpg)
Man-In-The-Middle Attack
![Page 85: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/85.jpg)
![Page 86: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/86.jpg)
![Page 87: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/87.jpg)
Actual content,
loaded into the
application
![Page 88: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/88.jpg)
Replaced the HTML content
of the response
![Page 89: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/89.jpg)
Result
![Page 90: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/90.jpg)
Okay, but what is the point?
![Page 91: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/91.jpg)
Actual content,
loaded into the
application
![Page 92: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/92.jpg)
Insert some extra
JavaScript code
![Page 93: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/93.jpg)
Result
App launches as always, nothing special?
![Page 94: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/94.jpg)
Pictures from the device
![Page 95: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/95.jpg)
How to protect against this?
![Page 96: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/96.jpg)
Conclusion Security of PhoneGap Plugins
What does the plugin do?
What is the quality of the code?
Is the plugin up-to-date (store & app)?
How do I use the plugin?
Do I still use every plugin in my
application?
![Page 97: Plugins in PhoneGap plugins.pdf · phonegap-plugin-push 17.008 Receive and handle native push notifications cordova-plugin-crosswalk-webview 15.357 Crosswalk webview (Android) cordova-camera-custom](https://reader035.vdocuments.mx/reader035/viewer/2022081522/5fc5a9ebc913e918e21f93d4/html5/thumbnails/97.jpg)