GithubHelp home page GithubHelp logo

activelook / android-sdk Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 5.0 827 KB

Android SDK for ActiveLook eyewear

Home Page: https://www.activelook.net/

Java 100.00%
activelook android-sdk augmented-reality smartglasses

android-sdk's People

Contributors

activelook-dev avatar kiiks avatar ondrap avatar sylvainromillon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

android-sdk's Issues

International support?

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

Coult not write rx - glasses crash

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)

Flow control problems

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:

  • run 6 fontSave (for 6 fonts) interspersed with [color, rect, rectf] (progressbar).
    • when there is no progressbar drawing, everything is OK
    • when there is progressbar drawing, the font saving randomly fails
    • when I introduce a small (200ms) delay after each progressbar update, it works OK
  • run a bunch of mixed 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.

Error while sending datas to glasses

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)

Connect to a device by specifying an address

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)

token

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.