No description, website, or topics provided.
Objective-C JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/ios
www
.gitattributes
.gitignore
LICENSE
README.md
plugin.xml

README.md

lineapro-phonegap-plugin

Quick start <-- this method is for xcode bbuild

  1. Make sure you have Cordova installed and not Phonegap. No idea why, but Cordova gave me less problems.
  2. From command line.
  3. cordova create HelloLineaproCitronium com.citronium.samples.hellolineapro
  4. cd HelloLineaproCitronium/
  5. cordova plugins add https://github.com/Little0ne95/Linea-Pro-Rachel-v1.git
  6. Open up the file HelloLineproCitronium/www/js/index.js and place the following text in the very top on a new line (do not delete any script)
    function onDeviceConnected(data) { alert("onDeviceConnected: " + data);}
    function onSuccessScanPaymentCard(data) { alert("onSuccessScanPaymentCard: " + data);}
    function onBarcodeScanned(data) {alert("onBarcodeScanned: " + data.rawCodesArr);}
  7. In the same file add LineaProCDV.initDT(onDeviceConnected, onSuccessScanPaymentCard, onBarcodeScanned); directly under app.receivedEvent('deviceready');
  8. cordova platforms add ios
  9. cordova build ios
  10. Now open up HelloLineproCitronium/platforms/ios/HelloCordova.xcodeproj in XCode
  11. Build the program to your Linea target
  12. The program should start and alert OnDeviceConnected: 1

If you are using a device with a Lightning Connector YOU MUST DISCONNECTIT FROM THE COMPUTER 7. The program will alert OnDeviceConnected: 2 8. Scan your barcode and watch the magic happen!

Quick start <-- this method is for use with phonegap build

  1. Make sure you have Cordova installed and Phonegap
  2. In the command line type: phonegap create HelloLineaproCitronium com.citronium.samples.hellolineapro
  3. In the command line type: cd HelloLineaproCitroniumTEST/
  4. In the command line type: phonegap plugins add https://github.com/Little0ne95/Linea-Pro-Rachel-v1.git
  5. Open up the file HelloLineproCitronium/www/js/index.js and place the following text in the very top on a new line (do not delete any script)
    function onDeviceConnected(data) { alert("onDeviceConnected: " + data);}
    function onSuccessScanPaymentCard(data) { alert("onSuccessScanPaymentCard: " + data);}
    function onBarcodeScanned(data) {alert("onBarcodeScanned: " + data.rawCodesArr);}
  6. In the same file add
    LineaProCDV.initDT(onDeviceConnected, onSuccessScanPaymentCard, onBarcodeScanned);
    directly under
    app.receivedEvent('deviceready');
  7. In the config.xml file add
    <gap:plugin name="com.lineapro-plugin.rachel" version="0.1" source="pgb" />
  8. In the index.html inside www folder add the following line
    <script type="text/javascript" src="plugins/com.citronium.lineaprocdv.v2/www/LineaProCDV.js"></script>
  9. Back in the command line type: Cordova platforms add iOS
  10. In the command line type: Cordova build ios
  11. In the command line type: Phonegap build iOS
  12. Now copy the config.xml file into platforms/iOS/www
  13. To upload to phonegap, zip the www folder which is inside platforms/iOS. This is the file you upload to phonegap build.
  14. Enable debugging & Enable hydration ( This is once you have uploaded the file into phonegap build)
  15. Click “ready to build”
  16. Select your iOS Key ( you may need to add this use this documentation if you don’t know how to http://docs.build.phonegap.com/en_US/3.3.0/signing_signing-ios.md.html . You will need an apple developer licence)
  17. Once built scan the QR code with a QR reader on your device ( your ipod/ihone will have to be in developer mode, you can do this by connecting to xcode on a mac or follow ne of the many guids online)
  18. Click on install when the notification shows
  19. The app should now be one your device.

ios 9 Update - phonegap problems

There are a few things too fix if you are using ios 9 these include the screen not responding to touch and the black borders. Fixing Screen not responding to touch:-

  1. Go to your app on Phone Gap Build
  2. Select Settings
  3. Unclick Enable Hydration

Fixing the black borders:-

  1. Create 10 Splash screens as following:-
    iosDefaultiphone.png width= 320px height= 480px
    Default@2x
    iphone.png width= 640px height= 960px
    Default-568h@2x.png width= 640px height= 1136px
    Default-667h@2x.png width= 750px height= 1334px
    Default-Portrait-736h@3x.png width= 1242px height= 2208px
    Default-Landscape-736h@3x.png width= 2208px height= 1242px
    Default-Portrait.png width= 768px height= 1024px
    Default-Landscape.png width= 1024px height= 768px
    Default-Portrait@2x.png width= 1536px height= 2048px
    Default-Landsc10 ape@2x.png width= 2048px height= 1536px
  2. Add these images to the file res/screen/ios/
  3. Add this code to your config.xml

    <gap:splash src="res/screen/iosDefaultiphone.png" gap:platform="ios" width="320" height="480" />
    <gap:splash src="res/screen/ios/Default@2xiphone.png" gap:platform="ios" width="640" height="960" />


<gap:splash src="res/screen/ios/Default-568h@2x.png" gap:platform="ios" width="640" height="1136" />


<gap:splash src="res/screen/ios/Default-667h@2x.png" gap:platform="ios" width="750" height="1334" />
<gap:splash src="res/screen/ios/Default-Portrait-736h@3x.png" gap:platform="ios" width="1242" height="2208" />
<gap:splash src="res/screen/ios/Default-Landscape-736h@3x.png" gap:platform="ios" width="2208" height="1242" />


<gap:splash src="res/screen/ios/Default-Portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="res/screen/ios/Default-Landscape.png" gap:platform="ios" width="1024" height="768" />


<gap:splash src="res/screen/ios/Default-Portrait@2x.png" gap:platform="ios" width="1536" height="2048" />
<gap:splash src="res/screen/ios/Default-Landscape@2x.png" gap:platform="ios" width="2048" height="1536" />

Device support

Universal plugin for following devices:

  • PPAD 1.0
  • MPED-400
  • BluePad-500
  • BluePad-50
  • Infinea TAB mini
  • Infinea TAB 4
  • Infinea TAB
  • Linea Pro 5
  • Linea Pro 4
  • PP-60
  • iSerial
  • Linea-Pro

Supported features:

  • Automatically device connection
  • Log all events
  • Start/Stop Barcode methods

Additional info

Using iOS SDK from http://www.datecs.bg/en/products/Universal-iOS-SDK/8/121 Using Advice and guild created by https://gist.github.com/johnvilsack Using Plugin base craeted by https://github.com/ttatarinov/lineapro-phonegap-plugin

(c) Citronium, 2014 http://citronium.com