LoginSignup
0
1

More than 3 years have passed since last update.

なぜBLEペアリング時に連絡先と通話履歴のアクセスパーミッションが要求されるのか

Last updated at Posted at 2020-08-22

はじめに

  • AndroidではBLEペアリング時にペアリングの許可を求めるダイアログが表示されますが、連絡先や通話履歴にアクセスするアプリではないのにも関わらず以下のような要求が表示されることがあります。

  • このチェックボックスが表示されてしまう理由について調べたことを備忘録的に残しておきます。

  • この記事にはチェックボックスを消す方法については書いていません。

関連記事

Androidのソースコード

<string name="bluetooth_pairing_shares_phonebook" msgid="9082518313285787097">"連絡先と通話履歴へのアクセスを許可する"</string>
/**
 * Creates the custom view with UI elements for user input.
 */
private View createPinEntryView() {
    View view = getActivity().getLayoutInflater().inflate(R.layout.bluetooth_pin_entry, null);
    TextView messageViewCaptionHint = (TextView) view.findViewById(R.id.pin_values_hint);
    TextView messageView2 = (TextView) view.findViewById(R.id.message_below_pin);
    CheckBox alphanumericPin = (CheckBox) view.findViewById(R.id.alphanumeric_pin);
    CheckBox contactSharing = (CheckBox) view.findViewById(
            R.id.phonebook_sharing_message_entry_pin);
    contactSharing.setText(getString(R.string.bluetooth_pairing_shares_phonebook,
            mPairingController.getDeviceName()));
    EditText pairingView = (EditText) view.findViewById(R.id.tex
    contactSharing.setVisibility(mPairingController.isProfileReady()
            ? View.GONE : View.VISIBLE);
    mPairingController.setContactSharingState();
    contactSharing.setOnCheckedChangeListener(mPairingController);
    contactSharing.setChecked(mPairingController.getContactSharingState(
    mPairingView = pairingView;
/**
 * A method for querying if the bluetooth device has a profile already set up on this device.
 *
 * @return - A boolean indicating if the device has previous knowledge of a profile for this
 * device.
 */
public boolean isProfileReady() {
    return mPbapClientProfile != null && mPbapClientProfile.isProfileReady();
}

考察

  • 端末が対応するプロファイルは機種ごとに決められているので、対応していないプロファイルの場合はとりあえず連絡先と通話履歴のアクセス権をリクエストするという仕様?(間違っていたら修正します。)

    • AQUOS sense2 SH-01Lの例 (https://jp.sharp/products/sh01l/spec.html)  sh01l_profile.png
    • そうだとすると、アプリが使うかどうかもわからないのに連絡先と通話履歴の権限を要求するのは不自然な気がする。
    • Androidのプロファイル周りについて("previous knowlege of a profile"とは?等)もう少し理解を深める必要はありそう。
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1