Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.
This repository was archived by the owner on Jan 4, 2023. It is now read-only.

[Java] NullPointerException at BluetoothManager.getBluetoothManager() #67

Description

@JafarKhQ

I build the tinyB from source and used it in a Java app. (Ubuntu & Raspbian)

When I run the App from IDE (intelliJ IDEA) it works fine, but after build the jar (Gradle), and run it form terminal, I got a NullPointerException At BluetoothManager.java line 221.

public static synchronized BluetoothManager getBluetoothManager() throws RuntimeException, BluetoothException
{
    ..
    .
    String APIVersion = BluetoothManager.class.getPackage().getSpecificationVersion();
    // APIVersion is null !!!
    if (APIVersion.equals(nativeAPIVersion) == false) {
        ...
        ..
        .
    }
}

As a temporary workaround I just removed this API version checking code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions