BluetoothChat | Bluetooth chat software based on Android Classic Bluetooth

 by   xiaoyaoyou1212 Java Version: Current License: No License

kandi X-RAY | BluetoothChat Summary

kandi X-RAY | BluetoothChat Summary

BluetoothChat is a Java library typically used in Networking applications. BluetoothChat has no vulnerabilities, it has build file available and it has low support. However BluetoothChat has 2 bugs. You can download it from GitHub.

Bluetooth chat software based on Android Classic Bluetooth currently only supports functions such as one-to-one real-time communication, file transfer, friend addition, friend grouping, friend online status update, etc. Message sending supports text, emoticons, etc.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              BluetoothChat has a low active ecosystem.
              It has 317 star(s) with 124 fork(s). There are 23 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 5 have been closed. On average issues are closed in 18 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of BluetoothChat is current.

            kandi-Quality Quality

              BluetoothChat has 2 bugs (0 blocker, 0 critical, 1 major, 1 minor) and 107 code smells.

            kandi-Security Security

              BluetoothChat has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              BluetoothChat code analysis shows 0 unresolved vulnerabilities.
              There are 10 security hotspots that need review.

            kandi-License License

              BluetoothChat does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              BluetoothChat releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              BluetoothChat saves you 1551 person hours of effort in developing the same functionality from scratch.
              It has 3453 lines of code, 275 functions and 66 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed BluetoothChat and discovered the below as its top functions. This is intended to give you an instant insight into BluetoothChat implemented functionality, and help decide if they suit your requirements.
            • Initialize event listener
            • Send a VISE message
            • Pack a Vise file
            • Writes data to the connection
            • Unpack data
            • Converts a byte array to an integer value
            • Checks if the right command is the right command
            • Assemble the packet
            • Encode bytes
            • Initialize the widget
            • Set the friend data
            • Runs the connect thread
            • Initialize the GroupFriendList
            • Main loop
            • Handle a Bluetooth receive callback
            • This method writes a bluetooth object into a parcel
            • Convert hex string to string
            • Decodes a byte array
            • Assemble the send packet
            • Initialize
            • Helper method to support ChatView
            • Get a child view
            • Get group view
            • SetOnItemClickListener
            • The accept thread
            • Initializes data dialog
            Get all kandi verified functions for this library.

            BluetoothChat Key Features

            No Key Features are available at this moment for BluetoothChat.

            BluetoothChat Examples and Code Snippets

            No Code Snippets are available at this moment for BluetoothChat.

            Community Discussions

            QUESTION

            how to correctly display a list of bluetooth devices
            Asked 2019-Jun-19 at 16:14

            I have an activity where I would like to show a list of both paired and unpaired bluetooth devices. I don't want a button that just shows the list, but the list is shown directly. I'm following the example of the android guides https://github.com/googlesamples/android-BluetoothChat/blob/master/Application/src/main/java/com/example/android/bluetoothchat/DeviceListActivity.java but I can't understand why the unpaired devices don't appear in the list, while the already paired devices appear correctly in the list. This is my code

            ...

            ANSWER

            Answered 2019-Jun-19 at 16:14

            Found a solution. You need to request location permission (ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION) at runtime

            Source https://stackoverflow.com/questions/56665807

            QUESTION

            Resources$NotFoundException: File res/drawable-hdpi-v4/ic_bluetooth.xml
            Asked 2018-Apr-15 at 14:21

            My app is working fine on api 23.

            However in api lower than 19, when I try to open the app, it throws an error, although I don't have an image view in my mainlayout:

            04-15 15:46:37.196 25249-25249/io.github.swarajsaaj.otpblogdemo E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{io.github.swarajsaaj.otpblogdemo/io.github.swarajsaaj.INFINITY.bluetoothchat.MainActivity}: android.view.InflateException: Binary XML file line #39: Error inflating class android.widget.ImageView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2255) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2309) at android.app.ActivityThread.access$700(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1289) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5317) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #39: Error inflating class android.widget.ImageView at android.view.LayoutInflater.createView(LayoutInflater.java:619) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691) at android.view.LayoutInflater.rInflate(LayoutInflater.java:752) at android.view.LayoutInflater.rInflate(LayoutInflater.java:760) at android.view.LayoutInflater.rInflate(LayoutInflater.java:760) at android.view.LayoutInflater.rInflate(LayoutInflater.java:760) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at io.github.swarajsaaj.INFINITY.bluetoothchat.BluetoothChatFragment.onCreateView(BluetoothChatFragment.java:354) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2074) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1286) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:758) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1671) at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:619) at io.github.swarajsaaj.INFINITY.common.activities.SampleActivityBase.onStart(SampleActivityBase.java:40) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1181) at android.app.Activity.performStart(Activity.java:5336) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2227) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2309)  at android.app.ActivityThread.access$700(ActivityThread.java:157)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1289)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:176)  at android.app.ActivityThread.main(ActivityThread.java:5317)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:417) at android.view.LayoutInflater.createView(LayoutInflater.java:593) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:760)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:760)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:760)  at android.view.LayoutInflater.inflate(LayoutInflater.java:495)  at android.view.LayoutInflater.inflate(LayoutInflater.java:397)  at io.github.swarajsaaj.INFINITY.bluetoothchat.BluetoothChatFragment.onCreateView(BluetoothChatFragment.java:354)  at android.support.v4.app.Fragment.performCreateView(Fragment.java:2074)  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1286)  at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:758)  at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1671)  at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)  at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:619)  at io.github.swarajsaaj.INFINITY.common.activities.SampleActivityBase.onStart(SampleActivityBase.java:40)  at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1181)  at android.app.Activity.performStart(Activity.java:5336)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2227)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2309)  at android.app.ActivityThread.access$700(ActivityThread.java:157)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1289)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:176)  at android.app.ActivityThread.main(ActivityThread.java:5317)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)  at dalvik.system.NativeStart.main(Native Method)  Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi-v4/ic_bluetooth.xml from drawable resource ID

            0x7f020062 ...

            ANSWER

            Answered 2018-Apr-15 at 14:18

            I guess APIs below 19 do not support some of the XML that is in your file: Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #1: invalid drawable tag vector

            Source https://stackoverflow.com/questions/49842908

            QUESTION

            Transmit data from smartwatch to smartphone over bluetooth
            Asked 2018-Jan-26 at 20:28

            I need some help for data transmission between Android Wear and Android phone. I found some tutorials and sample code, so I could make a framework. Much of my code is similar to the Android open source sample, https://github.com/googlesamples/android-BluetoothChat. But my question is, if devices are already paired, do I need them all? In other words, my Android Wear watch and Android phone are already paired, can data transfer be much simpler? Or do each application using Bluetooth need everything from above sample code? Anyone who has this kind of experience of knows useful samples, please help me!

            Thank you in advance!

            ...

            ANSWER

            Answered 2018-Jan-26 at 20:28

            If your devices are already paired you don't have to set up the Bluetooth connection yourself. You can simply use the Data Layer API to synchronize and send data between the wearable and the phone.

            Source https://stackoverflow.com/questions/48450709

            QUESTION

            Android phone and bluetooth device communication error
            Asked 2017-Dec-07 at 23:39

            I am modifying an Android bluetooth sample program to realise the communication between my android phone and an ELM327 module through Bluetooth.

            The application is build from the program using Android studio. The application works very well between two android phones.

            However, when I run it in one of my android phone and try to communicate with ELM327 module, the input messages coming from ELM327 are broken and some time has very serious delay. Could you please explain why the different apperances happen? If you can help to rectify the program, it will be really appreciated.

            Below is part of the sample code for this application:

            BluetoothChat.java: Handler

            ...

            ANSWER

            Answered 2017-Dec-07 at 23:39

            I missed adding "\r" at the end of each command message that I send from phone app to ELM327.

            After adding "\r", I can receive correct feedback from ELM327.

            Source https://stackoverflow.com/questions/47321714

            QUESTION

            message not received in Bluetooth chat. Is my handler broken?
            Asked 2017-Nov-14 at 06:41

            I am working on the project on the android dev. the website for BluetoothChat and it seems to be sending messages correctly but not receiving them. In the past, I attempted to create another Bluetooth app and when connecting to a device I was prompted to confirm the connection and presented with a pin code. when working on the current app I am never given a prompt. However, it is not hitting any exceptions and messages seem to be sending. Here is my Thread class for managing a connection:

            ...

            ANSWER

            Answered 2017-Nov-09 at 07:14

            I noticed that your Kotlin when blocks aren't replicating the function from the Java code.

            Kotlin:

            Source https://stackoverflow.com/questions/47194878

            QUESTION

            Get tank volume with ODBII in android
            Asked 2017-Oct-10 at 16:04

            I want to receive the remaining tank volume and the current mileage of my car by using OBD II.

            Therefore I have bought an OBDII Bluetooth Adapter for my car. I am using the AndroidBluetoothChat for connecting to devices and establishing a connection, through I can send and receive information.

            But when I try to connect to my OBD2 Adapter, I get: Unable to connect. The OBD2 Adapter is always discoverable and I can pair them normally. Why is that?

            The next question is, once i have established a connection, how can I receive Informationen like speed, mileage etc.

            I am still a beginner and gratefull for every hint.

            ...

            ANSWER

            Answered 2017-Oct-10 at 16:04

            i'm in your same project :D I start with BluetoothChat for understand how use Bluetooth and all works fine.... At the beginning you can chat with your OBD by sending Pids in the EditText from BluetoothChat...

            But remember that you need a \r (carriage return) after every commands that you send. For example if you need the RPM, send a string like "010c\r" and you get a response like 10c410cxx where xx is the value that you must divide by 4 for get the real RMP... See every pids and data transformation in this table...

            REMEMBER that for work the ELM327 (your obd device) need that the car is ON half turn key or total or you don't get data but only error!

            For the pids that you need (if your car support them) you can see all of them in the wikipedia page that i liked.

            If you want an automatic dynamic comunication with obd you must change the comunication of the BluetoothChat with some Queue or ArrayList of commands and send them continuosly.....

            REMEMBER that the ELM327 can manage one command each time....so send the first command and wait the response... and again send another command an wait response...and so on...

            Source https://stackoverflow.com/questions/46646871

            QUESTION

            Sending an APK via Bluetooth to another device
            Asked 2017-Aug-29 at 09:46

            I´m trying to develop an App which can send an .APK file via Bluetooth to another device with an Insecure Rfcomm connection. I´m running self-coded apps on both devices. The apps are not the same but I can still set the UUID, Rfcomm Listener and so on, so the connection should work fine and because of the insecure rfcomm without any alert to accept the transfer. I´ve tried the BluetoothChat example from the Android developer page, but I´ve got problems with changing the code for my purposes. Can anyone give me some snippets of code or any link to an tutorial how to setup Apps for Bluetooth File transfer? Every useful stuff is welcome.

            EDIT: You could say I´m trying to develop an app, which can "update" another app on another phone by Bluetooth.

            Thanks

            ...

            ANSWER

            Answered 2017-Aug-29 at 09:39

            QUESTION

            Continuously keep passing information from previous Activity to Current
            Asked 2017-Jun-16 at 08:19

            I want to send or forward the information to the next activity,practical- I have a Bluetooth Chat On which I receive message but on clicking a button the activity changes,I want to yet keep receiving the messages while on the new Activity Bluetooth Chat code

            ...

            ANSWER

            Answered 2017-Jun-16 at 08:19

            When you received the message on on BluetoothChatService, Broadcast the received message using local broadcast , And receive the message on the Activity which you need using Broadcast receiver.

            Reference: https://developer.android.com/reference/android/support/v4/content/LocalBroadcastManager.html

            Example on Local broadcast implementation http://www.sanfoundry.com/java-android-program-demonstrate-local-broadcast-manager/

            Hope it solves your problem .

            Source https://stackoverflow.com/questions/44540163

            QUESTION

            Start an if statement according to the message RECEIVED-Bluetooth
            Asked 2017-Jun-11 at 19:07

            I have created a bluetooth chat,I want to make changes as such that I want to perform an action if the

            if(messageRecieved.equals("message required"){ //Action } I do not know which statement is the above mentioned messageRecieved ref-:https://github.com/googlesamples/android-BluetoothChat/tree/master/Application/src/main/java/com/example/android/bluetoothchat

            ...

            ANSWER

            Answered 2017-Jun-11 at 18:58

            In BluetoothChatFragment.java add your logic inside handleMessage(Message msg) where the UI fragment receives the message from the service:-

            Source https://stackoverflow.com/questions/44487347

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install BluetoothChat

            You can download it from GitHub.
            You can use BluetoothChat like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the BluetoothChat component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/xiaoyaoyou1212/BluetoothChat.git

          • CLI

            gh repo clone xiaoyaoyou1212/BluetoothChat

          • sshUrl

            git@github.com:xiaoyaoyou1212/BluetoothChat.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Java Libraries

            CS-Notes

            by CyC2018

            JavaGuide

            by Snailclimb

            LeetCodeAnimation

            by MisterBooo

            spring-boot

            by spring-projects

            Try Top Libraries by xiaoyaoyou1212

            XSnow

            by xiaoyaoyou1212Java

            BLE

            by xiaoyaoyou1212Java

            ViseFace

            by xiaoyaoyou1212Java

            ViseLog

            by xiaoyaoyou1212Java

            ViseUtils

            by xiaoyaoyou1212Java