dieasmaz / capacitor-plugin-zebra-printer

Repo created to clone "https://github.com/cleversolutions/zebraCapacitor.git", for local development run `npm install` in repo root directory and then run `npm run build`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zebraCapacitor

Capacitor plugin for Zebra printers (ios and android)

Limitations

None of version 0.1.0 has been tested on real hardware yet. iOS has been tested on device, but with no printer. Android has had no testing.

But

I do intend to develop and support an app that uses this plugin, so this will eventually be completed and working (at least with for the printers I have access to test with).

iOS

After installing this, you may have to drag the libZSDK_API.a library into the ZebraCapacitor target of the Pods Project. Then update your build settings Library Search Paths with: "${PODS_ROOT}/../../../node_modules/zebra-capacitor/ios/Plugin/Plugin" I've updated the podspec so this may not be necessary anymore, but I havn't tested it yet.

Also for iOS update your apps Info.plist file with Supported external accessory protocols as an array with the value com.zebra.rawport.

Add this to your plist

<key>UISupportedExternalAccessoryProtocols</key>
<array>
    <string>com.zebra.rawport</string>
</array>

I'll experiment with trying to automate this via the podspec as well.

Android

Add the following to your AndroidManifest.xml

    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

and register the plugin in your MainActivity.java for example:

import ca.cleversolutions.zebracapacitor.ZebraCapacitorPlugin;
...
public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initializes the Bridge
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
      // Additional plugins you've installed go here
      // Ex: add(TotallyAwesomePlugin.class);
      add(ZebraCapacitorPlugin.class);
    }});
  }
}

About

Repo created to clone "https://github.com/cleversolutions/zebraCapacitor.git", for local development run `npm install` in repo root directory and then run `npm run build`


Languages

Language:Objective-C 77.8%Language:Java 9.2%Language:Swift 7.9%Language:TypeScript 3.5%Language:Ruby 1.1%Language:JavaScript 0.4%