- Red Magic 11 Air – vékony házból süvít a szél
- Csíptetős fülesek csatája – Sony LinkBuds Clip vs. Huawei FreeClip 2
- Mérföldkő a szilárdtest-akkuknál: fontos lépést tett a QuantumScape
- Újabb óriásakku a Honortól: a X80 lehet a következő 10 000 mAh-s modell
- iPhone 18 Pro Max: kis kapacitásbővítés hoz nagy előrelépést üzemidőben
Új hozzászólás Aktív témák
-
shinodas
tag
Köszi a válaszokat!
Azt hiszem megoldottam, már csak egy apróság
(ELnézést a tényleg primitív kérdéseimért, de tényleg abszolút kezdő vagyok)
Szóval a logcat azt mondja, h kapcsolódni próbál az eszköz de nem tudja azt befejezni, először azt írja, hogy kapcsolódva, majd 2 sorral lejjebb már ugyan ez az állapot false.import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.UUID;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.Context;
import android.os.Handler;
import android.util.Log;
public class BluetoothConnection extends Thread {
private BluetoothAdapter bluetooth = null;
private BluetoothSocket socket = null;
private InputStream inputStream = null;
private OutputStream outputStream = null;
private static final UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
static final int BL_NOT_AVAILABLE = 1;
static final int BL_SOCKET_FAILED = 2;
protected static final int BL_INCORRECT_ADDRESS = 3;
private Handler mHandler = null;
public BluetoothConnection(Context context, Handler handler){
bluetooth = BluetoothAdapter.getDefaultAdapter();
mHandler = handler;
if(bluetooth == null){
mHandler.sendEmptyMessage(BL_NOT_AVAILABLE);
return;
}
}
public void BT_Connect(String Address){
Log.d("CONNECTION", "...On Resume...");
String address = Address;
if(!BluetoothAdapter.checkBluetoothAddress(address)){
return;
}else{
BluetoothDevice device = bluetooth.getRemoteDevice(address);
try{
socket = device.createRfcommSocketToServiceRecord(uuid);
}catch(IOException e){
Log.d("RFCOMM", "socket create fail" + e.getMessage());
mHandler.sendEmptyMessage(BL_SOCKET_FAILED);
return;
}
bluetooth.cancelDiscovery();
[B]Log.d("BLUETOOTH", "-----CONNECTING---"); //idáig jut[/B]
try{
socket.connect();
Log.d("BLUETOOTH", "Connecting is ok");
}catch(IOException e){
try{
socket.close();
}catch(IOException e2){
Log.d("BLUETOOTH", "In onResume() and unable to close socket during connection failure" + e2.getMessage());
mHandler.sendEmptyMessage(BL_SOCKET_FAILED);
return;
}
}
}
}
}LOGCAT:
06-07 12:48:35.200: I/ActivityManager(231): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.example.hxxpd/.MainActivity } from pid 11341
06-07 12:48:35.270: D/CONNECTION(11934): ...On Resume...
06-07 12:48:35.280: E/BluetoothService.cpp(231): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session)
06-07 12:48:35.280: D/BLUETOOTH(11934): -----CONNECTING---
06-07 12:48:35.740: E/BluetoothEventLoop.cpp(231): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/10666/hci0/dev_CC_AF_78_B4_F7_6A
06-07 12:48:35.740: D/BluetoothService(231): setRemoteDeviceProperty addr = CC:AF:78:B4:F7:6A name = Connected value = true
06-07 12:48:37.090: D/BluetoothService(231): updateDeviceServiceChannelCache(CC:AF:78:B4:F7:6A)
06-07 12:48:37.110: D/BluetoothService(231): uuid(system): 0000111e-0000-1000-8000-00805f9b34fb 3
06-07 12:48:37.120: D/BluetoothService(231): uuid(system): 00001105-0000-1000-8000-00805f9b34fb 10
06-07 12:48:37.140: V/BluetoothEventRedirector(11975): Received android.bleutooth.device.action.UUID
06-07 12:48:37.140: D/BluetoothService(231): Cleaning up failed UUID channel lookup: CC:AF:78:B4:F7:6A 00001101-0000-1000-8000-00805f9b34fb
06-07 12:48:37.330: E/CachedBluetoothDevice(11975): updating profiles for JABBA
06-07 12:48:37.330: V/CachedBluetoothDevice(11975): Class: 7e010c
06-07 12:48:37.330: V/CachedBluetoothDevice(11975): UUID:
06-07 12:48:37.360: V/CachedBluetoothDevice(11975): 00001000-0000-1000-8000-00805f9b34fb
06-07 12:48:37.390: V/CachedBluetoothDevice(11975): 00001104-0000-1000-8000-00805f9b34fb
06-07 12:48:37.390: V/CachedBluetoothDevice(11975): 00001105-0000-1000-8000-00805f9b34fb
06-07 12:48:37.390: V/CachedBluetoothDevice(11975): 00001106-0000-1000-8000-00805f9b34fb
06-07 12:48:37.410: V/CachedBluetoothDevice(11975): 0000110a-0000-1000-8000-00805f9b34fb
06-07 12:48:37.420: V/CachedBluetoothDevice(11975): 0000110b-0000-1000-8000-00805f9b34fb
06-07 12:48:37.420: V/CachedBluetoothDevice(11975): 0000110c-0000-1000-8000-00805f9b34fb
06-07 12:48:37.420: V/CachedBluetoothDevice(11975): 0000110e-0000-1000-8000-00805f9b34fb
06-07 12:48:37.420: V/CachedBluetoothDevice(11975): 00001112-0000-1000-8000-00805f9b34fb
06-07 12:48:37.440: V/CachedBluetoothDevice(11975): 00001115-0000-1000-8000-00805f9b34fb
06-07 12:48:37.440: V/CachedBluetoothDevice(11975): 0000111b-0000-1000-8000-00805f9b34fb
06-07 12:48:37.470: V/CachedBluetoothDevice(11975): 0000111e-0000-1000-8000-00805f9b34fb
06-07 12:48:37.470: V/CachedBluetoothDevice(11975): 0000111f-0000-1000-8000-00805f9b34fb
06-07 12:48:37.470: V/CachedBluetoothDevice(11975): 00001123-0000-1000-8000-00805f9b34fb
06-07 12:48:37.470: V/CachedBluetoothDevice(11975): 0350278f-3dca-4e62-831d-a41165ff906c
06-07 12:48:37.470: E/CachedBluetoothDevice(11975): onUuidChanged: Time since last connect67267896
06-07 12:48:41.100: E/BluetoothEventLoop.cpp(231): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/10666/hci0/dev_CC_AF_78_B4_F7_6A
06-07 12:48:41.100: D/BluetoothService(231): setRemoteDeviceProperty addr = CC:AF:78:B4:F7:6A name = Connected value = false
06-07 12:48:41.330: V/BluetoothEventRedirector(11975): Received android.bleutooth.device.action.UUID
06-07 12:48:41.350: E/CachedBluetoothDevice(11975): updating profiles for JABBA
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): Class: 7e010c
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): UUID:
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 00001000-0000-1000-8000-00805f9b34fb
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 00001104-0000-1000-8000-00805f9b34fb
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 00001105-0000-1000-8000-00805f9b34fb
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 00001106-0000-1000-8000-00805f9b34fb
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 0000110a-0000-1000-8000-00805f9b34fb
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 0000110b-0000-1000-8000-00805f9b34fb
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 0000110c-0000-1000-8000-00805f9b34fb
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 0000110e-0000-1000-8000-00805f9b34fb
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 00001112-0000-1000-8000-00805f9b34fb
06-07 12:48:41.350: V/CachedBluetoothDevice(11975): 00001115-0000-1000-8000-00805f9b34fb
06-07 12:48:41.359: V/CachedBluetoothDevice(11975): 0000111b-0000-1000-8000-00805f9b34fb
06-07 12:48:41.359: V/CachedBluetoothDevice(11975): 0000111e-0000-1000-8000-00805f9b34fb
06-07 12:48:41.359: V/CachedBluetoothDevice(11975): 0000111f-0000-1000-8000-00805f9b34fb
06-07 12:48:41.359: V/CachedBluetoothDevice(11975): 00001123-0000-1000-8000-00805f9b34fb
06-07 12:48:41.359: V/CachedBluetoothDevice(11975): 0350278f-3dca-4e62-831d-a41165ff906c
06-07 12:48:41.359: E/CachedBluetoothDevice(11975): onUuidChanged: Time since last connect67271789
Új hozzászólás Aktív témák
- Folyószámla, bankszámla, bankváltás, külföldi kártyahasználat
- Lakáshitel, lakásvásárlás
- alza vélemények - tapasztalatok
- Milyen monitort vegyek?
- Linux kezdőknek
- Red Magic 11 Air – vékony házból süvít a szél
- Milyen autót vegyek?
- Fotók, videók mobillal
- Milyen processzort vegyek?
- Bestbuy játékok
- További aktív témák...
- BeQuiet! GAMER alap! i9-14900K / Z790 / 32GB 6000MHz / 2TB Gen4 / 1000w Gold! BeszámíTOK
- SteelSeries Arctis Nova PRO PC-Xbox headset + GameDAC GEN 2 + fülpárnák
- HifiMan Arya Organic gyári fejhallgatókábel (6,3mm jack - 2x3,5mm jack) 1,5m
- iPad Pro 11 (M5) Wifi + Cellular 256GB (Bontatlan) 1 éb garancia
- Eladó Asus ROG Nuc15 (2025) - Ultra 9 275HX, RTX 5070 Ti Laptop, 32GB/1TB, hibátlan, magyar garis
- LG 65QNED86T3A / QNED / 65" - 164 cm / 4K UHD / 120Hz / HDR Dolby Vision / FreeSync Premium / VRR
- GYÖNYÖRŰ iPhone 11 Pro 64GB Silver -1 ÉV GARANCIA - Kártyafüggetlen, MS3565
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Lenovo ThinkPad L13 Gen 3 i5-1245U FHD+ 16GB 512GB 1 év teljeskörű garancia
- ÁRGARANCIA!Épített KomPhone Ryzen 5 7600X 32/64GB RAM RX 9070 16GB GAMER PC termékbeszámítással
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Azt hiszem megoldottam, már csak egy apróság


