How to hide Android Bluetooth App in Launcher without removing Bluetooth services? - java

I am trying to hide Android Bluetooth App from Launcher without removing Bluetooth services. I found some approaches to this but they also remove Bluetooth services. I just need to hide the Bluetooth app icon.
Here is the app source code:
https://android.googlesource.com/platform/packages/apps/Bluetooth/
Thanks.

Related

Debugging an android app thats working with serial ports

I am developing an android app to communicate to a drone using MAVLINK. I am using UsbSerial by felHR85 and dronefleet libraries for this. After building and installing the app, I use my phone as an Android USB host and connect a PixHawk microcontroller to it.
When I run the app on my phone with PixHawk attached, I have no method to know why my app crashes (if it does crash). I just get the "App keeps stopping" error message. I cannot view the log messages via Logcat since I'm not connected to my PC. The serial port library developer has given the idea of debugging over WiFi but I do majority of my work in my office where I use Ethernet LAN, not WiFi.
Without the app crash stacktrace, I cannot move further. So how do I debug my app, specifically app crashes?
Details:
Android Studio Arctic Fox
Ubuntu 18 LTS
Java programming language
Samsung android phone with Android 11
I'm also developing an app that acts as a USB Host to an Arduino board.
For debug, I'm using Logcat app (https://play.google.com/store/apps/details?id=com.tananaev.logcat&hl=en&gl=US). This allows you to view the Logcat logs on your Android phone.
You need to follow the directions in the app description:
Connect your phone via USB cable and run following adb command:
adb tcpip 5555
Disconnect USB cable before trying to use the app.
You can filter the logcat results by keyword or tag, and/or search for a keyword. I've found it very useful.
If this doesn't work for you, I've seen that there are other similar apps that you can try.

Android Send files via Bluetooth programmatically

I have a java android app that list all nearby Bluetooth active devices, and the user can pair with a device.
I want to make the user when is paired with another device to send files or images via Bluetooth.
How can I achieve that in android (java)?
If you're doing this over classic Bluetooth, have a look at the following links:-
Bluetooth file transfer for Android
Android Bluetooth file sending
How can I send a file through bluetooth with Android devices
Android: Send image via Bluetooth
If you're doing this via Bluetooth Low Energy, have a look at the following links:-
The ultimate guide to Android BLE development
Bluetooth LE send string data between two devices
Transfer image through BLE in Android

How to configure a BLE device as a bridge to communicate from android app to a USB device?

I have a BLE device (BlueMode+S42). I have attached the BLE device to a phone via a USB cable. Now I want to communicate via an app I created that sends something to the other phone.
Android App (Bluetooth) -----> BLE device (USB cable) -----> Android phone
I can already connect and disconnect from the BLE device via the app. I can read the UUID's from the BLE Device too. So I already have the app that communicates with BLE, the problem now is to set the BLE device as a bridge to communicate from the app to the other phone.
The github project is available here (It works fine, don't look at the roughness of the code please :D): https://github.com/Dehma/BleConnectionProject.git
Edit:
Ok I did both connections and now I'm struggling with how to connect them toghether so the phones can communicate each other.

Android Studio - Insistent Notifications on Oreo w/ Notification Channels

I am currently developing an app where insistent notifications are required. However, I can't seem to get them to work unless the app is open. Is there a way to get insistent notifications connected to the notification channel, even when the app is not open? I'm using a Windows Service to curl the notifications. I'm developing on Oreo. Thank you!

Sending message from Android host device to wear when app is not running

I'm building a simple motivational quote app that generates a random quote from a MySQL database. The app works fine on mobile and I want to sync the quote message to a Wear device. I'm using MessageApi to do so and used this tutorial to set it up: http://android-wear-docs.readthedocs.org/en/latest/sync.html.
However, the message functionality only works when the app is running on the host device. I need to launch the app on Wear alone and still be able to receive the message from the mobile device. I thought of running the same application on the Wear device where it will run an httpconnection on it's own but from what I understand this is not possible with Android Wear.
So my question is, is there a way to open an app on a Wear device that will trigger the mobile app to open in the background and hence receive the message that way?
Your mobile app can implement WearableListenerService. In that service implementation, you can listen to messages that are sent to your phone from your companion app on a wear device (when such message is sent to your phone, the framework on your phone starts up your service and passes the message to it). You can then implement the logic you need in that service (fetch a quote, etc) and respond back to your wear's message; when its work is done, that service will go away on its own. For this to work, your wear app needs to send such message to your phone app upon start up (or whenever you see appropriate in your app). This approach should work and probably is the most appropriate approach for your use case.

Categories

Resources