MCPcopy Create free account
hub / github.com/deviceplug/btleplug / get_device_name

Method get_device_name

src/droidplug/jni/objects.rs:294–310  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

292 }
293
294 pub fn get_device_name(&self) -> Result<Option<String>> {
295 let obj = self
296 .env
297 .call_method_unchecked(
298 self.internal,
299 self.get_device_name,
300 JavaType::Object("Ljava/lang/String;".to_string()),
301 &[],
302 )?
303 .l()?;
304 if obj.is_null() {
305 Ok(None)
306 } else {
307 let name_str = self.env.get_string(obj.into())?;
308 Ok(Some(name_str.into()))
309 }
310 }
311
312 pub fn request_mtu(&self, mtu: jint) -> Result<JObject<'a>> {
313 self.env

Callers 2

connectMethod · 0.80
try_fromMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected