Kotlin 101: How to communicate to a Bluetooth device Part 1

  Рет қаралды 77,504

Apptaura

Apptaura

Күн бұрын

Пікірлер: 53
@armansattar6710
@armansattar6710 4 жыл бұрын
Thank you so much for this. There aren't many useful guides on how to start using Bluetooth and yours was concise and brilliant.
@guynimni382
@guynimni382 5 жыл бұрын
Great tutorial! Tnx for taking the time to record it. I just wanted to have a quick start with communicating with the Arduino via Bluetooth. Next step for me is to dig deep into the Kotlin+Android fundamentals in order to better understand some of the things you did in the video :)
@ilkesert1050
@ilkesert1050 4 жыл бұрын
Unresolved reference: select_device_refresh. I have this problem on MainActivity but i haven't got any problem at activty_mainly CAN U HELP
@omeryumusak6900
@omeryumusak6900 3 жыл бұрын
add build.gradle this code plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-android-extensions' }
@omeryumusak6900
@omeryumusak6900 3 жыл бұрын
türkmüşsün zaten bu kodları ekle
@krisjanisnoviks120
@krisjanisnoviks120 3 жыл бұрын
@@omeryumusak6900 thank you :)
@cassidygonzalez374
@cassidygonzalez374 2 жыл бұрын
Add this line above the line that uses select_device_refresh: val select_device_refresh = findViewById(R.id.select_device_refresh) as Button
@jamesedwards9054
@jamesedwards9054 5 жыл бұрын
The items are not showing in my list view...
@zainablawal97
@zainablawal97 2 жыл бұрын
Hi Apptaura, Thank you so much for this tutorial. Is there a way i can receive data from an arduino hc-06 Bluetooth device?
@scodedead9061
@scodedead9061 5 жыл бұрын
Great tutorial !!! but i always get could'nt connect ( HC-5 ) to arduino , huft i did not see any error ,should i ???
@aqualk3722
@aqualk3722 5 жыл бұрын
Thanks it helped.can you update the code for see the name of bt device on listview and reading data
@hugopetrucci3938
@hugopetrucci3938 3 жыл бұрын
there are many things that don´t work on android studio 4.2.2 , please describe version that you use
@hugopetrucci3938
@hugopetrucci3938 3 жыл бұрын
3.0.1
@carlosproduction4183
@carlosproduction4183 5 жыл бұрын
Just a question, I have to do something about "position" in (your) line 58, do I have to initialize it in some way (val position:Int = 1 ?) Thank you anyway !
@samqueen8337
@samqueen8337 3 жыл бұрын
If your list does appear it may be because the font and the text color are both set to white. Try changing the background-color of your list
@robertauer2763
@robertauer2763 4 жыл бұрын
Something has changed - I'm following the instructions to the letter and I keep getting: "AndroidManifest.xml:13:9-17:25: AAPT: error: unexpected element found in " and the android:name is in Red.
@loriklassen2416
@loriklassen2416 6 жыл бұрын
The arduino code listed doesnt correspond with the what the tutorial teaches. Where can i find the correct android sketch
@jaumebobet9998
@jaumebobet9998 6 жыл бұрын
Is there a way to show in the ListView te connected device names instead or together with de device MAC address ?. Thank you in advance. Apart from this issue, your example and explanations are great. I've learned a lot and I customized it for my own purpouses. It works very well
@guynimni382
@guynimni382 5 жыл бұрын
Don't know if it's relevant after so much time passed :) What I did was to add a new array that holds only the device names and pass it to the listView. private fun pairedDeviceList() { m_pairedDevices = m_bluetoothAdapter!!.bondedDevices val list : ArrayList = ArrayList() val listOfNames : ArrayList = ArrayList() // Added if (!m_pairedDevices.isEmpty()) { for (device: BluetoothDevice in m_pairedDevices) { list.add(device) listOfNames.add(device.name); // Added Log.i("device", ""+device.name) } } else { toast("no paired bluetooth devices found") } val adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, listOfNames) // Changed to listOfNames select_device_list.adapter = adapter select_device_list.onItemClickListener = AdapterView.OnItemClickListener { _, _, position, _ -> val device: BluetoothDevice = list[position] val address: String = device.address val intent = Intent(this, ControlActivity::class.java) intent.putExtra(EXTRA_ADDRESS, address) startActivity(intent) } }
@frootyfloyd9398
@frootyfloyd9398 3 жыл бұрын
@@guynimni382 Great!
@videos4mydad
@videos4mydad 2 жыл бұрын
Unfortunately a lot of code in this tutorial is now "deprecated" and we cannot simply follow the tutorial step by step. I am trying to find a more recent tutorial.
@pascalschaer
@pascalschaer Жыл бұрын
same. Have you found anything?
@videos4mydad
@videos4mydad Жыл бұрын
@@pascalschaer I am learning Flutter and Dart. That way I can write it once and use it on Android and iOS. Unfortunately, using bluetooth on something like React Native and Expo frameworks is a complete pain in the ass even though I am familiar with React.
@mattgewain7743
@mattgewain7743 5 жыл бұрын
Very Good tutorial. But the font on Android Studio is to small for me to read except on my biggest monitor. I wish I could see it better.
@freedomphiliplachica5414
@freedomphiliplachica5414 4 жыл бұрын
I'm getting error. The word list is underlined red saying: expression 'list' of type 'kotlin.collections.ArrayList /* = java.util.ArrayList */' cannot be invoked as a function what should I do?
@K0nzerv
@K0nzerv 4 жыл бұрын
Thank you for this tutorial, you saved me tonnes of time.
@mannhansen9337
@mannhansen9337 5 жыл бұрын
Thanks for sharing this tutorial. How can I import it into Android Studio version 3.5.3 ? I have tried but get lots of errors. Looks like compatibility issues with the new version ?
@danny117hd
@danny117hd 3 жыл бұрын
Presentation size coding window please. Or maybe use the magnifier
@MyVoid312
@MyVoid312 4 жыл бұрын
any idea on how to do it on java?
@emethp7751
@emethp7751 6 жыл бұрын
Is this tutorial applicable in communication between a Bluetooth low energy beacon and a phone that supports the same?
@apptaura8131
@apptaura8131 6 жыл бұрын
Hi Emeth, thanks for the comment. Unfortunately Bluetooth and Bluetooth low energy are two completely different technologies. However we may look into doing a tutorial on Bluetooth low energy at a later date.
@riekje321
@riekje321 6 жыл бұрын
Would be nice. Thanks.
@陳少豪
@陳少豪 5 жыл бұрын
Thanks for your tutorial
@geekmustafa
@geekmustafa 6 жыл бұрын
Thinks bro but if u can make one about received data plz 😊
@DrequimaX
@DrequimaX 5 жыл бұрын
Sir, can u tell how to display message from BT device, I used m_bluetoothSocket!!.inputStream.read(output.toByteArray()), but it is not working!
@ryszardal2631
@ryszardal2631 4 жыл бұрын
hi, did u solved it?
@Jim1Dean
@Jim1Dean 3 жыл бұрын
@@ryszardal2631 i want to know it too
@jayverma1870
@jayverma1870 3 жыл бұрын
kindly zoom your code when you record video
@smyra
@smyra 4 жыл бұрын
Hi, I don't know if you still follow this but I'll give a try for my question. First, I want to thank you for this tutorial. I'm unfortunately late and pretty new on this. Now, I'm using AndroidStudio do lots of things have been changed, I assume. I used all your coding, butI'm getting some error and unfortunately again I couldn't solve it and also find on the net. So maybe you can help me with this. Android gives an error at the SelectDeviceActivity class with this code: "val intent= Intent(this, academy.mestim.neurostimulator.ControlActivity: :class.java)" with the error: " e: C:\Users\smyra\AndroidStudioProjects euroStimulator\app\src\main\java\academy\mestim eurostimulator\SelectDeviceActivity.kt: (63, 84): Expecting ')' ". I tried "alt + enter" but it didn't help either. So, waiting for your help. Have a nice day
@alanlowe9716
@alanlowe9716 Жыл бұрын
Ditto. It is difficult to follow this tutorial when everything he types is deprecated.
@V3NG3ANC33
@V3NG3ANC33 6 жыл бұрын
Link to that wallpaper pls?!
@apptaura8131
@apptaura8131 6 жыл бұрын
Hi zyyystan, thanks for the comment. Here is a link to the wallpaper: bit.ly/2GB4dbu
@tryJOCIM
@tryJOCIM 2 жыл бұрын
0dp didnt work
@zenon5940
@zenon5940 5 жыл бұрын
Your tutorial is quite interesting BUT .... it would be so much more interesting if we could read more easily what you show us on your monitor, Have you ever considered having more contrast like for instance black otext on white background ?
@scottcarrington1023
@scottcarrington1023 5 жыл бұрын
Could it be your internet connection? I was having troubles in some areas, too, but after restarting my modem and going full screen on the video, the text was crystal clear.
@CharlesGouin
@CharlesGouin 6 жыл бұрын
You could have made this video much sorter by showing less of the design process. Your title is "How to communicate to a Bluetooth device", not "Android studio 101". Great video anyway and thx!
@apptaura8131
@apptaura8131 6 жыл бұрын
Hi Ozkee, thanks for the comment. We will keep this in mind for future turorials.
@MyVoid312
@MyVoid312 4 жыл бұрын
Damn if it was in java ://
Kotlin 101: How to communicate to a Bluetooth device Part 2
31:07
Kotlin 101: How to communicate via Serial Connection Part 2
32:45
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
Vampire SUCKS Human Energy 🧛🏻‍♂️🪫 (ft. @StevenHe )
0:34
Alan Chikin Chow
Рет қаралды 138 МЛН
Reverse Engineering Bluetooth Low Energy (BLE) Devices
59:52
Elektor TV
Рет қаралды 6 М.
Building Android Apps to Control Bluetooth LE Devices
38:51
CrossComm, Inc.
Рет қаралды 36 М.
Android Lollipop: Bluetooth LE Matures
1:11:44
InfoQ
Рет қаралды 54 М.
Android AIDL Explained in Detail with Practical in 15 Mins
15:05
AOSP »» Android »» AI »» Tech News to Go
Рет қаралды 29 М.
Bluetooth | Android Studio | Kotlin
21:14
Atif Pervaiz
Рет қаралды 44 М.
Евгений Антропов - Core Bluetooth не так уж и страшен
45:05
Mobius — конференция по мобильной разработке
Рет қаралды 1,8 М.