🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

expo-datawedge

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-datawedge

Add Zebra DataWedge capabilities to your Android based Expo application.

0.1.2
latest
Source
npm
Version published
Weekly downloads
7
75%
Maintainers
0
Weekly downloads
 
Created
Source

Expo DataWedge Logo

Expo DataWedge

Add Zebra DataWedge capabilities to your Android based Expo application.

Installation

Note: Expo DataWedge only works with Android devices that support Zebra's DataWedge intent broadcasting.

Download

  • Using npm:
    • npm install expo-datawedge
  • Using yarn:
    • yarn add expo-datawedge

Configure for Expo

In the app.json file for your Expo application, you will need to add expo-datawedge in the plugins section.

...

"plugins": [
    "expo-datawedge"
]

...

Usage

import { useEffect } from 'react';
import { Alert, Platform } from 'react-native';

import * as expoDataWedge from 'expo-datawedge';


...

useEffect(() => {
    if (Platform.OS === 'android') {
        expoDataWedge.addScanListener((event) => {
            Alert.alert('Got Scan', JSON.stringify(event));
        })
    }

    return () => {
      
    }
}, []);


...

Testing

Since DataWedge capabilities are not supported natively by the default Expo Go application, you will need to build a packaged development build of your application to test Expo DataWedge. It is recommended to have your Zebra device plugged into your computer with USB debugging enabled as using the Android emulator does not contain the DataWedge application.

  • Prebuild your application:

    • npx expo prebuild
  • Build and run your application:

    • npx expo run:android

Configuring DataWedge

  • Create a new DataWedge profile:

    DataWedge Profile Creation

  • Configure DataWedge Profile:

    DataWedge Profile Creation

    • Set Intent action value to us.domkalan.expo-datawedge.ACTION.
    • Set Intent category name to android.intent.category.DEFAULT.
    • Set Intent delivery to Broadcast intent.
    • Add packaged app name to component information.
      • Example: If your app is com.example.myapp, select it from the new component popup and enable secure data delivery.

Keywords

expo

FAQs

Package last updated on 03 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts