Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android USB + Bluetooth permissions #62

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**.idea/
**.idea/
.DS_Store
12 changes: 12 additions & 0 deletions cordova-starprnt.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/android" isTestSource="false" packagePrefix="starprnt.cordova" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="lib" level="project" />
</component>
</module>
Binary file removed frameworks/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-starprnt",
"version": "2.2.0",
"version": "2.3.0",
"description": "StarPRNT Cordova Plugin for Star Micronics Bluetooth/LAN printers",
"types": "./types/index.d.ts",
"cordova": {
Expand Down Expand Up @@ -28,4 +28,4 @@
},
"author": "Jose Angarita / Ruben Casas"

}
}
24 changes: 19 additions & 5 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-starprnt" version="2.1.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<plugin id="cordova-plugin-starprnt" version="2.4.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>StarPRNT</name>
<description>Plugin to use Star printers and connected drawer</description>
<author>Jose Angarita / Ruben Casas</author>
<keywords>print,starmicronics,star printer</keywords>
<license>MIT</license>
<engines>
<engine name="cordova" version=">=3.4.0"/>
<engine name="cordova-android" version=">=12.0.0" />
</engines>
<js-module name="StarPRNT" src="www/StarPRNT.js">
<clobbers target="starprnt" />
</js-module>
<platform name="android">
<source-file src="src/android/StarPRNT.java" target-dir="src/starprnt/cordova" />
<!-- Using StarPRNT_Android_SDK_V5_5_0 -->
<!-- Using StarPRNT_Android_SDK_V5_17_0 -->
<source-file src="src/android/lib/StarIOPort3.1.jar" target-dir="libs" />
<source-file src="src/android/lib/starioextension.jar" target-dir="libs" />
<config-file target="res/xml/config.xml" parent="/*">
<feature name="StarPRNT">
<param name="android-package" value="starprnt.cordova.StarPRNT" />
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/*" />
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" />
</config-file>
</platform>
<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:resource="@xml/device_filter" />
<meta-data android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" android:resource="@xml/accessory_filter" />
</config-file>

<!-- app/src/main/ get prepended to target -->
<resource-file src="src/android/xml/device_filter.xml" target="res/xml/device_filter.xml" />
<resource-file src="src/android/xml/accessory_filter.xml" target="res/xml/accessory_filter.xml" />
</platform>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="StarPRNT">
Expand Down
Binary file removed src/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion src/android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading