discoverability

How to Change the Scan Mode of Bluetooth Adapter in android.?

纵然是瞬间 提交于 2021-02-07 09:46:41
问题 Currently i am working on a Bluetooth app where i need to change the Scan Mode from SCAN_MODE_CONNECTABLE_DISCOVERABLE to SCAN_MODE_CONNECTABLE on click of a button. i am setting it Discoverable using following Intent: Intent discoverableIntent = new Intent( BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); discoverableIntent .putExtra( BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, DISOVERABLE_DURATION); startActivityForResult(discoverableIntent, REQUEST_DISCOVERABLE_BT); where i have set

Setting discoverable mode for bluetooth to always on seam to fail

爷,独闯天下 提交于 2019-12-22 13:51:21
问题 I am trying to set the bluetooth discoverable mode to always on in Android 4.0 . This should be possible with 4.0, with the command: Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); enableBtIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0); After executing this I get a dialog that asks if it is OK to start bluetooth with discoverybility always on. If I press yes the bluetooth setting will show the time 0:00 and it will NOT countdown. So far it

Android: Set Bluetooth Discoverability Unbounded

梦想与她 提交于 2019-12-19 04:22:50
问题 I have spent the last couple of days trying to make an app that keeps my Samsung Galaxy S3 mini (Android 2.1.4) discoverable for an "infinite" amount of time. My code looks currently as follows: package com.example.downtoone; import android.app.Activity; import android.os.Bundle; import android.support.v4.content.LocalBroadcastManager; import android.widget.Toast; import com.example.downtoone.*; import android.bluetooth.*; import android.content.BroadcastReceiver; import android.content

Android: Set Bluetooth Discoverability Unbounded

Deadly 提交于 2019-12-19 04:22:24
问题 I have spent the last couple of days trying to make an app that keeps my Samsung Galaxy S3 mini (Android 2.1.4) discoverable for an "infinite" amount of time. My code looks currently as follows: package com.example.downtoone; import android.app.Activity; import android.os.Bundle; import android.support.v4.content.LocalBroadcastManager; import android.widget.Toast; import com.example.downtoone.*; import android.bluetooth.*; import android.content.BroadcastReceiver; import android.content

Android Application Bluetooth visibility duration

浪尽此生 提交于 2019-12-06 17:09:28
问题 Is there a way to let my application be discoverable for a time the app is running? I tried to do this with Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0); startActivityForResult(discoverableIntent, DISC_DURATION); as shown on Android Developers, but the Duration of 0 doesn't work so the default value 120 is set. Is there a way to set it as visible all the time? 回答1: there is no

Setting discoverable mode for bluetooth to always on seam to fail

两盒软妹~` 提交于 2019-12-06 07:57:04
I am trying to set the bluetooth discoverable mode to always on in Android 4.0 . This should be possible with 4.0, with the command: Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); enableBtIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0); After executing this I get a dialog that asks if it is OK to start bluetooth with discoverybility always on. If I press yes the bluetooth setting will show the time 0:00 and it will NOT countdown. So far it looks fine, but after 2 min the bluetooth will change to unvisible mode again (if the previous setting

HAL - is it a violation to the HAL format/standard if links are in the main body?

白昼怎懂夜的黑 提交于 2019-11-27 15:58:09
According to the HAL standard (see here and here ) the links to other resources should be placed in a specific embedded section. So for instance this is not valid HAL, is my understanding correct? { "movies": [ { "id": "123", "title": "Movie title 1", "_links": { "subtitles": { "href": "/movies/123/subtitles" } } },{ "id": "456", "title": "Movie title 2", "_links": { "subtitles": { "href": "/movies/456/subtitles" } } } ], "_links": { "self": { "href": "/movies" } } } The reason for which the above JSON is not valid HAL is that the links should be placed in an embedded section ( "_embedded" )

HAL - is it a violation to the HAL format/standard if links are in the main body?

不羁的心 提交于 2019-11-26 17:22:11
问题 According to the HAL standard (see here and here) the links to other resources should be placed in a specific embedded section. So for instance this is not valid HAL, is my understanding correct? { "movies": [ { "id": "123", "title": "Movie title 1", "_links": { "subtitles": { "href": "/movies/123/subtitles" } } },{ "id": "456", "title": "Movie title 2", "_links": { "subtitles": { "href": "/movies/456/subtitles" } } } ], "_links": { "self": { "href": "/movies" } } } The reason for which the