activelook / android-sdk Goto Github PK
View Code? Open in Web Editor NEWAndroid SDK for ActiveLook eyewear
Home Page: https://www.activelook.net/
Android SDK for ActiveLook eyewear
Home Page: https://www.activelook.net/
Hi
I am a Japanese engineer.
I bought development kit DK-1 and tried running the sample program.
I noticed that Japanese is not displayed.
Do you have any plans for internationalization or Japanese language?
Thanks
Hi there,
I am experiencing a strange issue. Sometimes after disconnecting and reconnecting to the glasses without turning them off in between, the following error message is logged to Logcat thousands of times, eventually followed by a StackOverflowException. Unfortunately I cannot reliably reproduce the error, sometimes it happens, sometimes it doesn't.
The biggest issue with this is that it crashes the glasses to the point where I am unable to turn them off by long pressing the power button. I tried holding the power button for a very long time (~10s) and eventually the glasses turned off but refused to turn back on. They can be reset by connecting them to the charging cable after which everything starts working normally.
Package name is replaced by xxxxxxxxx due to an NDA and for privacy reasons.
2024-01-11 10:21:49.388 26838-26906 unstackWri...acteristic de....xxxxxxxxxxxxxx E Error, retry
2024-01-11 10:21:49.396 26838-26906 unstackWri...risticLoop de....xxxxxxxxxxxxxx E Could not write rx: FF37011C4D00C8006404FFFF4E6F206461746120736F7572636500AA
FATAL EXCEPTION: Thread-8
Process: xxxxxxxxxx, PID: 27035
java.lang.StackOverflowError: stack size 1039KB
at java.util.ArrayList$Itr.<init>(ArrayList.java:974)
at java.util.ArrayList.iterator(ArrayList.java:954)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl.lambda$unstackWriteRxCharacteristicLoop$4(GlassesGattCallbackImpl.java:399)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl$$ExternalSyntheticLambda2.accept(Unknown Source:4)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl.lambda$unstackWriteRxCharacteristicLoop$3(GlassesGattCallbackImpl.java:369)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl$$ExternalSyntheticLambda1.run(Unknown Source:2)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl.lambda$unstackWriteRxCharacteristicLoop$4(GlassesGattCallbackImpl.java:399)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl$$ExternalSyntheticLambda2.accept(Unknown Source:4)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl.lambda$unstackWriteRxCharacteristicLoop$3(GlassesGattCallbackImpl.java:369)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl$$ExternalSyntheticLambda1.run(Unknown Source:2)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl.lambda$unstackWriteRxCharacteristicLoop$4(GlassesGattCallbackImpl.java:399)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl$$ExternalSyntheticLambda2.accept(Unknown Source:4)
There seems to be something not quite correct with the way the device is handling flow control. I'm quite deterministically able to induce the following situations:
fontSave
(for 6 fonts) interspersed with [color, rect, rectf] (progressbar).
imgSave
, layoutSave
, layoutDisplayExtended
(the order is such that the images and layouts needed for the display are correctly saved) is able to get the glasses in some semi-stuck mode - screen is blank, it doesn't react to e.g. BT disconnection. Introducing small delay before or after each imgSave
and layoutSave
seems to fix the problem.It seems to me there is some dependency between 'drawing' and 'saving'. and one doesn't like the other.
Also, is there some way to wait for the send buffer to get empty? It may happen that I get too many commands in queue and instead of building an ever larger backlog, I'd be able to start dropping the display requests in the application. I'd need some way to call flush
which would return when the sending queue is empty. Currently I just read some battery status and assume that when I get a value back, everything sent so far was processed. I just wonder if there was some way without the extra roundtrip.
I tried to set me up a really basic project but the problem is that I can't send data to the glasses
Thr following error occures on any "glasses.method" such as circ, clear or txt
[ 0xFF, 0x01, 0x01, 0x06, 0x00, 0xAA ]
2023-12-19 12:13:22.499 17209-17225 writeCommand com.example.testactivelook W payload length: 6
2023-12-19 12:13:22.523 17209-17225 BluetoothGatt com.example.testactivelook W Unhandled exception in callback
java.lang.ArrayIndexOutOfBoundsException: src.length=6 srcPos=0 dst.length=6 dstPos=0 length=256
at java.lang.System.arraycopy(Native Method)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl.unstackWriteCommand(GlassesGattCallbackImpl.java:282)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl.writeCommand(GlassesGattCallbackImpl.java:260)
at com.activelook.activelooksdk.core.ble.GlassesImpl.writeCommand(GlassesImpl.java:70)
at com.activelook.activelooksdk.core.GlassesCommandsAdapter.write(GlassesCommandsAdapter.java:200)
at com.activelook.activelooksdk.core.GlassesCommandsAdapter.clear(GlassesCommandsAdapter.java:228)
at com.example.testactivelook.MainActivity.lambda$onCreate$0(MainActivity.java:54)
at com.example.testactivelook.MainActivity$$ExternalSyntheticLambda2.accept(Unknown Source:2)
at com.activelook.activelooksdk.core.ble.GlassesGattCallbackImpl.onCharacteristicRead(GlassesGattCallbackImpl.java:139)
at android.bluetooth.BluetoothGattCallback.onCharacteristicRead(BluetoothGattCallback.java:108)
at android.bluetooth.BluetoothGatt$1$6.run(BluetoothGatt.java:425)
at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:864)
at android.bluetooth.BluetoothGatt.-$$Nest$mrunOrQueueCallback(Unknown Source:0)
at android.bluetooth.BluetoothGatt$1.onCharacteristicRead(BluetoothGatt.java:419)
at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:182)
at android.os.Binder.execTransactInternal(Binder.java:1290)
at android.os.Binder.execTransact(Binder.java:1249)
Would it be possible to connect directly to a device by specifing an address? Currently the API allows this only by first running scan; however when the app already has an address given, just connecting to the device looks like a better workflow and one doesn't have to synchronize with other parts of the application trying to scan for BLE devices.
I'm not a BlueTooth android expert, but the API seems to allow for this:
https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#getRemoteDevice(java.lang.String)
Hello,
I am trying to connect to my new glasses DK1 using the sample code.
when I run it it, the code appears to initialise and I get confirmation in the log.e below
2022-12-29 11:00:37.977 32675-32675/com.example.githubexample E/ANDROID: Permissions
2022-12-29 11:00:37.990 32675-32675/com.example.githubexample E/SDK: Init
2022-12-29 11:00:37.991 32675-32675/com.example.githubexample E/SDK: Instance
2022-12-29 11:00:37.991 32675-32675/com.example.githubexample E/SDK: Scan
2022-12-29 11:00:38.446 32675-32675/com.example.githubexample E/DISCOVER: Glasses connecting: 80:15:05:00:06:0A
2022-12-29 11:00:41.284 32675-379/com.example.githubexample E/Volley: [34533] NetworkUtility.shouldRetryException: Unexpected response code 403 for http://vps468290.ovh.net/v1/firmwares/ALK02A/your-sdk-token-provided-by-microoled?compatibility=4&min-version=4.6.0
2022-12-29 11:00:41.287 32675-32675/com.example.githubexample W/System.err: com.android.volley.AuthFailureError
2022-12-29 11:00:41.291 32675-32675/com.example.githubexample E/ERROR: Glasses could not be connected
2022-12-29 11:00:42.156 32675-381/com.example.githubexample E/Volley: [34534] NetworkUtility.shouldRetryException: Unexpected response code 403 for http://vps468290.ovh.net/v1/firmwares/ALK01A/your-sdk-token-provided-by-microoled?compatibility=4&min-version=4.6.0
in the documentation it suggest I need a TOKEN
"_Initialization
To start using the SDK, first import and initialize the sdk. You will need a token provided by Microoled to authenticate."
any assistance would be appreciated
regards
Jeremy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.