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

  • BgirlNilaya

    BgirlNilaya

    29 EKİM 2008
  • Kupa World

    Kupa World

    1 EYLÜL 2011
  • NYCarspotter

    NYCarspotter

    26 EYLÜL 2011