README
Instrukcja instalacji pluginu VendimobTracker
English version below
Dodaj vendimob-tracker-plugin z npm (menedżer pakietów Javascript; więcej na: https://www.npmjs.com/) do config.xml. Dokładny link do pakietu: https://www.npmjs.com/package/vendimob-tracker-plugin.
<widget id="com.phonegap.yourApplication" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"> (…) <gap:plugin name="vendimob-tracker-plugin" source="npm"/> (…) </widget>
Zmodyfikuj funkcję onDeviceReady w pliku www/js/index.js tak, by wywołała funkcję tworzącą agenta z pluginu vendimob-tracker-plugin (VendimobTrackerPlugin.createVendimobAgent()).
onDeviceReady: function() { app.receivedEvent('deviceready'); (…) if (VendimobTrackerPlugin){ VendimobTrackerPlugin.createVendimobAgent("StringApplicationId", BooleanDebugMode); }); (…) },
Przekazywane parametry:
StringApplicationId - Id Twojej aplikacji przekazane w Stringu
BooleanDebugMode - Boolean, true jeśli chcesz uruchomić VendimobAgenta w trybie debugowania, false jeśli nie.Dodaj funkcje do obsługi VendimobAgenta w pliku www/js/index.js.
var app = { (…) // Funkcja do zatrzymania VendimobAgenta // Pamiętaj o wywołaniu jej przed zatrzymaniem aplikacji stopAgent: function(){ if (VendimobTrackerPlugin){ VendimobTrackerPlugin.stopAgent(); } }, // Funkcja do zmiany trybu Debug w VendimobAgent setDebugMode: function(debugMode){ if (VendimobTrackerPlugin){ VendimobTrackerPlugin.setDebugMode(debugMode); } } (…) }
Parametry:
debugMode - Boolean, true jeśli chcesz uruchomić debug mode, false jeśli nie.Wrzuć projekt na stronę Phonegap Build (https://build.phonegap.com/apps) i go zbuduj.
VendimobTracker plugin instalation.
Add vendimob-tracker-plugin from npm (package manager for the JavaScript; more on: https://www.npmjs.com/) to confing.xml. Exact package link: https://www.npmjs.com/package/vendimob-tracker-plugin
<widget id="com.phonegap.yourApplication" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"> (…) <gap:plugin name="vendimob-tracker-plugin" source="npm"/> (…) </widget>
Modify onDeviceReady function in www/js/index.js file and call function to create agent from vendimob-tracker-plugin (VendimobTrackerPlugin.createVendimobAgent()).
onDeviceReady: function() { app.receivedEvent('deviceready'); (…) if (VendimobTrackerPlugin){ VendimobTrackerPlugin.createVendimobAgent("StringApplicationId", BooleanDebugMode); }); (…) },
createVendimobAgent parameters:
StringApplicationId - your application Id in String
BooleanDebugMode - Boolean, true if VendimobAgent should run in DebugMode, false if not.Add functions for handling VendimobAgengt in www/js/index.js file.
var app = { (…) // Function for stopping VendimobAgent // Remember to run this function before closing your application stopAgent: function(){ if (VendimobTrackerPlugin){ VendimobTrackerPlugin.stopAgent(); } }, // Function to start DebugMode in VendimobAgent setDebugMode: function(debugMode){ if (VendimobTrackerPlugin){ VendimobTrackerPlugin.setDebugMode(debugMode); } } (…) }
Parameters:
debugMode - Boolean, true if VendimobAgent should run in DebugMode, false if not.Upload project on Phonegap Build page (https://build.phonegap.com/apps) and build it.