SORU
27 EYLÜL 2010, PAZARTESİ


Nasıl/android program aracılığıyla bluetooth devre dışı bırakmak için

MERHABALAR,

Aşağıdaki kodu vardır../program sayesinde bluetooth devre dışı bırakmak istiyorum.

BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();    
if (!mBluetoothAdapter.isEnabled()) {
        Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
        startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);

Ama kod bu tür SDK 1.5..Nasıl SDK olarak aynı şeyi ben 1.5. çalışmıyor?

CEVAP
8 HAZİRAN 2011, ÇARŞAMBA


bu kod benim için.. çalıştı

//Disable bluetooth
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();    
if (mBluetoothAdapter.isEnabled()) {
    mBluetoothAdapter.disable(); 
} 

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • ★TheCrono Official Channel★

    ★TheCrono

    3 Mayıs 2014
  • 1881 Animation

    1881 Animati

    5 EKİM 2013
  • Ryan Ha

    Ryan Ha

    9 NİSAN 2006