i want to calculate the Round Trip Time (RTT) for server
I've developed a UDP sender and Receiver where the destination port for the receiver is dynamically allocated using the "BindNextPort" to do so.
I've tested it on windows and it works fine "tested in UE editor and Wireshark"
but when building for android.. it doesn't work
any clues?
I've searched online and found you need to add INTERNET permission to the manifest but also doesn't work
Related
I am working on a part of an indoor localization project. I need my Flutter application scan and get Mac addresses and RSSI values of Wifi and Bluetooth devices. I am using flutter_blue for bluetooth scans and wifi_scan for Wifi scans. The application works well while in the foreground but scans are failing when the application is in background.
What I have tried so far:
Tried to change Bluetooth scan mode from ScanMode.lowLatency to ScanMode.lowPower and ScanMode.opportunistic for the startScan() method for flutter_blue.
flutter_background. I managed to do some tasks in background but wifi and bluetooth did not work.
flutter_background_service the same situation
flutter_foreground_plugin the same situation
flutter_foreground_task the same situation
workmanager did not try it because it says it can trigger the bg operation per every 15 minutes but I am scanning per every 6 seconds.
Is there any way to achieve this? Aren't there any package with the option backgroundMode: true? I don't know the natives. Don't know Kotlin too.
According to the Android Developer documentation, ScanMode.lowPower is the only possible mode for background scanning. You also need to request location access for the background (documentation here and here).
Consider switching to Flutter Blue Plus instead of Flutter Blue; Flutter Blue Plus is the currently-maintained version. This pull request on GitHub shows that Flutter Blue cannot run in the background. The pull request has never been merged.
After a lot of things have been tried, I just tried to get GPS location too.
Used this package: location
And execute location.enableBackgroundMode(enable: true) as it is stated in readme, then my wifi and bluetooth scans starts working in background too.
It's Ridicoulus
I'm trying to replicate this RaspberryPI example on Android
I created an app for android to advertise a URL using mDNS (jmDNS library), the app works well and I can receive the message on another phone using ZeroConf Browser app
But when I try to receive the same message using Physical Web app nothing happens, the app doesn't find the service.
I believe the problem is in the way I send hostname and txt-records.
This is my code:
serviceInfo = ServiceInfo.create(type,
"www.google.github.io", 80,
"path=/physical-web/");
/*A Key value map that can be advertised with the service*/
serviceInfo.setText(getDeviceDetailsMap());
jmdns.registerService(serviceInfo);
can you help me understand what is wrong?
See these discussions:
https://github.com/openhab/jmdns/issues/25
https://github.com/google/physical-web/issues/414
In short, I think the issue is because the url is in a text record, rather than in the service name, but the Physical Web may change the required format in the future...mdns support is still developing.
I'm creating an android application that interfaces with the texas instruments sensortag. One of the things the app needs to do is be able to change the frequency in which the temperature is reported to the app. I am able to change it through the official TI app which is great, but I cannot seem to get it working in my app.
When viewing the official app (iOS, can't run the android one?), it shows the temperature GATT service, which contains 3 characteristics. When I inspect the characteristics discovered by my app however, it only seems to find two - the data, and the notifications. Not the interval. I have attempted to construct this characteristic myself and write it however it doesn't do anything - no error, no success, just nothing.
The steps I've taken are essentially:
bluetoothGatt.discoverServices();
...
services = bluetoothGatt.getServices();
...
BluetoothGattService service = bluetoothGatt.getService(serviceUUID);
System.out.println("Characteristic = " + service.getCharacteristic(SensorTagGatt.UUID_IRT_PERI));
The output yields null. Is there something obvious I'm missing or that I should be doing that I might not be?
EDIT:
I've installed another app onto the phone written by another developer, and using this to inspect the services and characteristics available shows that it too is unable to find it, so I'm assuming there is something wrong with the android service discovery? The official iOS app is working as expected, and showing all characteristics. Unfortunately, the official android app seems to be incompatible with the version 1.5 firmware and crashes when trying to connect but I assume it too will fail to find the characteristic.
Has anyone else run into this issue and if so been able to get around it?
I am into a new project which requires me to use a USBconnected "Webcam".
The whole fun should run on Android 4.4.
my little story was:
I try multiple apps which do this - all work on both my testing devices
adapting some NDK lib that directly uses /dev/video0. This didnt work due to read-permission that was not granted in a new File("dev/video0").canRead() check. Although my unix permissions are correct, this seems to not work due to some new check on Android 4.4. (the whole thing was suggested here: Connect Android phone to a USB Web camera )
next: discover the UsbAccessory API that supposedly easens a lot of the above.
´find no documentation or anything about how to correctly handle a webcam
I still try, but don't come further than finding no device via
usbManager.getAccessory();
I've also tried to discover devices by filtering for a USB_ATTACHED broadcast but nothing triggers.
So I am starting to ask myself how the hell do others find the devices & communicate with them to get the pictures?
Anyone has sources from which i could learn, or a tutorial or something?
Little update from my side:
- I've gotten access by using the Android USB Host API e.g. UsbDevice instead of UsbAccessory.
- I have the connection and everything setup fine, and can now send binary data to my webcam and supposedly receive.
I can now send controlCommands via connection.controlTransfer(...) or use a "UsbRequest" in order to receive data.
However, I couldn't find any documentation to "make the camera submit pictures" to me. My Endpoint is of type XFER_INT (=interrupts).
I am continuing to try sending out various commands (e.g. binary values) but haven't had any success so far.
I cannot force to work android + appengine example to work on any device. On emulator there was some problems off course, but now everything is working well. On the device all the time I get "failed to register/unregister: email#address". I've done every single step from https://developers.google.com/eclipse/docs/appeng_android_run_debug but it's not going to be better in any way:/