crpt
This commit is contained in:
@@ -168,7 +168,6 @@ dependencies {
|
|||||||
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
||||||
}
|
}
|
||||||
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
||||||
implementation(files("libs/printer-lib-2.2.4.aar"))
|
|
||||||
|
|
||||||
if (hermesEnabled.toBoolean()) {
|
if (hermesEnabled.toBoolean()) {
|
||||||
implementation("com.facebook.react:hermes-android")
|
implementation("com.facebook.react:hermes-android")
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
package com.anonymous.Assemblr;
|
|
||||||
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.facebook.react.bridge.ReactApplicationContext;
|
|
||||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
||||||
import com.facebook.react.bridge.ReactMethod;
|
|
||||||
|
|
||||||
import net.posprinter.IDeviceConnection;
|
|
||||||
import net.posprinter.POSConnect;
|
|
||||||
import net.posprinter.TSCPrinter;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class AwesomeModule extends ReactContextBaseJavaModule {
|
|
||||||
private final ReactApplicationContext context;
|
|
||||||
private final Map<String, IDeviceConnection> printersMap = new HashMap<>();
|
|
||||||
AwesomeModule(ReactApplicationContext context) {
|
|
||||||
super(context);
|
|
||||||
this.context = context;
|
|
||||||
POSConnect.init(this.context);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void initPrinters(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public String getName() {
|
|
||||||
return "AwesomeModule";
|
|
||||||
}
|
|
||||||
|
|
||||||
@ReactMethod
|
|
||||||
public void test() {
|
|
||||||
Log.d("AwesomeModule", "AwesomeModule test");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
package com.anonymous.Assemblr;
|
package com.anonymous.Assemblr;
|
||||||
// @generated begin react-native-keyevent-import - expo prebuild (DO NOT MODIFY) sync-6d2345dd84c398e4e99d7d44eb792294628c7e34
|
|
||||||
import android.view.KeyEvent;
|
|
||||||
import com.github.kevinejohn.keyevent.KeyEventModule;
|
|
||||||
// @generated end react-native-keyevent-import
|
|
||||||
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -15,49 +11,6 @@ import com.facebook.react.defaults.DefaultReactActivityDelegate;
|
|||||||
import expo.modules.ReactActivityDelegateWrapper;
|
import expo.modules.ReactActivityDelegateWrapper;
|
||||||
|
|
||||||
public class MainActivity extends ReactActivity {
|
public class MainActivity extends ReactActivity {
|
||||||
// @generated begin react-native-keyevent-body - expo prebuild (DO NOT MODIFY) sync-4ba28f58cc0b4a775aa231e380b7f40e8f34382a
|
|
||||||
@Override
|
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
|
||||||
|
|
||||||
// // Uncomment this is key events should only trigger once when key is held down
|
|
||||||
// if (event.getRepeatCount() == 0) {
|
|
||||||
// KeyEventModule.getInstance().onKeyDownEvent(keyCode, event);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // This will trigger the key repeat if the key is held down
|
|
||||||
// // Comment this out if uncommenting the above
|
|
||||||
KeyEventModule.getInstance().onKeyDownEvent(keyCode, event);
|
|
||||||
|
|
||||||
// // Uncomment this if you want the default keyboard behavior
|
|
||||||
// return super.onKeyDown(keyCode, event);
|
|
||||||
|
|
||||||
// // The default keyboard behaviour wll be overridden
|
|
||||||
// // This is similar to what e.preventDefault() does in a browser
|
|
||||||
// // comment this if uncommenting the above
|
|
||||||
super.onKeyDown(keyCode, event);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
|
||||||
KeyEventModule.getInstance().onKeyUpEvent(keyCode, event);
|
|
||||||
|
|
||||||
// // Uncomment this if you want the default keyboard behavior
|
|
||||||
// return super.onKeyUp(keyCode, event);
|
|
||||||
|
|
||||||
// // The default keyboard behaviour wll be overridden
|
|
||||||
// // This is similar to what e.preventDefault() does in a browser
|
|
||||||
// // comment this if uncommenting the above
|
|
||||||
super.onKeyUp(keyCode, event);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) {
|
|
||||||
KeyEventModule.getInstance().onKeyMultipleEvent(keyCode, repeatCount, event);
|
|
||||||
return super.onKeyMultiple(keyCode, repeatCount, event);
|
|
||||||
}
|
|
||||||
// @generated end react-native-keyevent-body
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
// Set the theme to AppTheme BEFORE onCreate to support
|
// Set the theme to AppTheme BEFORE onCreate to support
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
package com.anonymous.Assemblr;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.facebook.react.ReactPackage;
|
|
||||||
import com.facebook.react.bridge.NativeModule;
|
|
||||||
import com.facebook.react.bridge.ReactApplicationContext;
|
|
||||||
import com.facebook.react.uimanager.ViewManager;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class MyAppPackage implements ReactPackage {
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<NativeModule> createNativeModules(
|
|
||||||
ReactApplicationContext reactContext) {
|
|
||||||
List<NativeModule> modules = new ArrayList<>();
|
|
||||||
|
|
||||||
modules.add(new AwesomeModule(reactContext));
|
|
||||||
|
|
||||||
return modules;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
// export const baseUrl = 'https://assemblr.denco.store';
|
export const baseUrl = 'https://assemblr.denco.store';
|
||||||
export const baseUrl = 'http://192.168.1.101:5000';
|
// export const baseUrl = 'http://192.168.1.101:5000';
|
||||||
const apiClient = axios.create({
|
const apiClient = axios.create({
|
||||||
baseURL: baseUrl
|
baseURL: baseUrl
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
const ScanCrptModal = () => {
|
const ScanCrptModal = () => {
|
||||||
return (<ScanBa)
|
return (<></>)
|
||||||
}
|
}
|
||||||
@@ -12,13 +12,7 @@ function MoneyScreen() {
|
|||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<Text style={{fontSize: 36}}>Money</Text>
|
<Text style={{fontSize: 36}}>Money</Text>
|
||||||
<BasicButton
|
|
||||||
onPress={() => {
|
|
||||||
console.log("Button pressed");
|
|
||||||
}}
|
|
||||||
label={"Press me"}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user