I am trying to port the sdk mainactivity kotlin code to an Ionic/capacitor plugin.
the code doesn’t match the rc5 library , see pic atrached
uwbManager.init() takes 3 parms… context, activity, and a List of denied???
but the uwbdemo does
uwbManager.init(this)
my code is not running in a UI context… and ‘this’ doesn’t exist as an referencable object…
what does the manager expect here?
it is used on init, connect, disconnect, connectsuspend. startScanning, stopScanning.
these are my remaining errors
None of the following functions can be called with the arguments supplied:
public open fun init(fragment: Fragment, onDenied: (List<DeniedRequirement>) -> Unit = ...): Unit defined in com.estimote.uwb.api.EstimoteUWBManager
public open fun init(activity: FragmentActivity, onDenied: (List<DeniedRequirement>) -> Unit = ...): Unit defined in com.estimote.uwb.api.EstimoteUWBManager
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val LifecycleOwner.lifecycleScope: LifecycleCoroutineScope defined in androidx.lifecycle
Unresolved reference. None of the following candidates is applicable because of receiver type
mismatch:
public val LifecycleOwner.lifecycleScope: LifecycleCoroutineScope defined in androidx.lifecycle
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val LifecycleOwner.lifecycleScope: LifecycleCoroutineScope defined in androidx.lifecycle
these last are from
job = lifecycleScope.launch {
and
.launchIn(lifecycleScope)
any advise guiidance welcomed…
the sample app runs and locates beacons
@jimiasty i am also working on android uwb sdk and facing Denied requirement: HasUWBFeature
even though i have added all necessary permissions in manifest file and running on android 14 in emulator on android studio
also, how do I get the identity of the device in the rangingResult?
the object properties don’t expand to include any estimote beacon or Bluetooth device.
also, where would i find the angles? the position object doesn’t seem to articulate them
@sdetweil Which laptop you use to run android studio. I am facing issue of DeniedRequirement: HasUWBFeature
Does UWB feature depend on the laptop on which we are running android studio
I have added all the permissions in manifest file also but facing issue of DeniedRequirement: HasUWBFeature and also I am running build on android 14 inn android studio emulator?
i am using a mac mini for my development
i dont even get build successfully for my version of the code, but the supplied app works
i am debugging on a real.phone not emulator
desktop/laptop do not have uwb devices, so emulator is not helpful
1 Like
can’t get my build problem yet, same as above, upgraded android studio, gradle, gradle plugin, java version
questions on the sdk
is the scanResult.beacon.deviceId the same as the rangingResult.device
and are those the same as the ios sdk , publicID value?
also, connect and disconnect ask for the bluetooth ID, but i wouldn’t know it as I am using the publicID.
shouldn’t these all be publicID like in the IOS lib…
i assume I can manual connect to the scanned devices just like ios… and so connect needs the abstract handle… (and disconnect the same) I assume the SDK is caching the devices, like it appears the IOS sdk is doing.
so, I ‘think’ I have the plugin build right, but I need the estimote lin in the app for the build to work, just like the ios framework…
but I get these build errors in the app when I include the estimiate dependency
> Could not resolve androidx.core.uwb:uwb:1.0.0-alpha08.
Required by:
project :
> No matching variant of androidx.core.uwb:uwb:1.0.0-alpha08 was found. The consumer was configured to find a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.6' but:
- Variant 'libraryVersionMetadata' capability androidx.core.uwb:uwb:1.0.0-alpha08 declares a component, and its dependencies declared externally:
- Incompatible because this component declares documentation for use during 'library-version-metadata' and the consumer needed a library for use during runtime
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'releaseVariantReleaseApiPublication' capability androidx.core.uwb:uwb:1.0.0-alpha08 declares a library, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, with the library elements 'aar' and the consumer needed a component for use during runtime, packaged as a jar
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'releaseVariantReleaseRuntimePublication' capability androidx.core.uwb:uwb:1.0.0-alpha08 declares a library for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, packaged as a jar
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'sourcesElements' capability androidx.core.uwb:uwb:1.0.0-alpha08 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
> Could not resolve no.nordicsemi.android:ble-ktx:2.4.1.
android studio can tell me there is a newer version, so the maven url is right and as can find the libs