Want a Android bluetooth to be always visible until app running?

后端 未结 3 1091
有刺的猬
有刺的猬 2021-01-01 06:24

I want that my bluetooth to be visible until the app is running. Like for infinite time. I will turn it off when Im done with it.

I don\'t want it to ask user for du

3条回答
  •  萌比男神i
    2021-01-01 07:03

    I am confused, because on Android Dev Guide, it is said the following:

    [..] By default, the device will become discoverable for 120 seconds. You can define a different duration by adding the EXTRA_DISCOVERABLE_DURATION Intent extra. The maximum duration an app can set is 3600 seconds, and a value of 0 means the device is always discoverable. Any value below 0 or above 3600 is automatically set to 120 secs). For example, this snippet sets the duration to 300.[..]

    Isnt it the feature we are looking for?

提交回复
热议问题