opendroneid / receiver-android

Example Android receiver application for unmanned aircraft Remote ID
Apache License 2.0
186 stars 61 forks source link

Hi, trying to make apk, last android studio Android api 30 built tools 28-32 not working, gradle version, and his plugin version 7.0.2 #48

Closed khazov88 closed 2 years ago

khazov88 commented 2 years ago

Hi, trying to make apk, last android studio Android api 30 built tools 28-32 not working, gradle version, and his plugin version 7.0.2

Task :app:compileDebugJavaWithJavac
E:\desctop\Android\app\src\main\java\org\opendroneid\android\app\DebugActivity.java:181: warning: [deprecation] getExternalStoragePublicDirectory(String) in Environment has been deprecated
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS), "OpenDroneID");
^
E:\desctop\Android\app\src\main\java\org\opendroneid\android\app\DebugActivity.java:226: warning: [deprecation] setWifiEnabled(boolean) in WifiManager has been deprecated
wifiManager.setWifiEnabled(true);
^
E:\desctop\Android\app\src\main\java\org\opendroneid\android\app\DebugActivity.java:333: warning: [deprecation] Handler() in Handler has been deprecated
handler = new Handler();
^
E:\desctop\Android\app\src\main\java\org\opendroneid\android\bluetooth\WiFiBeaconScanner.java:84: warning: [deprecation] setWifiEnabled(boolean) in WifiManager has been deprecated
wifiManager.setWifiEnabled(true);
^
E:\desctop\Android\app\src\main\java\org\opendroneid\android\bluetooth\WiFiBeaconScanner.java:182: warning: [deprecation] startScan() in WifiManager has been deprecated
boolean ret = wifiManager.startScan();
^
E:\desctop\Android\app\src\main\java\org\opendroneid\android\app\DeviceList.java:233: warning: [deprecation] setColorFilter(int,Mode) in Drawable has been deprecated
droneIcon.setColorFilter(0xff00ff00, PorterDuff.Mode.MULTIPLY);
^
E:\desctop\Android\app\src\main\java\org\opendroneid\android\app\HelpMenu.java:33: warning: [deprecation] fromHtml(String) in Html has been deprecated
helpView.setText(Html.fromHtml(linkText));
^
E:\desctop\Android\app\src\main\java\org\opendroneid\android\app\HelpMenu.java:43: warning: [deprecation] fromHtml(String) in Html has been deprecated
helpView.setText(Html.fromHtml(linkText));
^
E:\desctop\Android\app\src\main\java\org\opendroneid\android\app\HelpMenu.java:50: warning: [deprecation] fromHtml(String) in Html has been deprecated
helpView.setText(Html.fromHtml(linkText));
friissoren commented 2 years ago

Those are just warnings. They will not prevent you from building the APK file. You need to provide some additional information about the problem you are having.

BTW: Could you delete the comment you made over in this issue? It doesn't really belong to that discussion. Thanks: https://github.com/sxjack/uav_electronic_ids/issues/9#issuecomment-1084828108

khazov88 commented 2 years ago

I built opendroneid apk, and installed it on oneplus 6. but i thing it not working because of scan function deprecation. OpenDroneId not see my mavic pro.

friissoren commented 2 years ago

I don't think any DJI drones are currently broadcasting drone ID data according to the ASTM/ASD-STAN defined standards, since it is not mandatory to do that yet in any regions. I cannot be sure though.

Keep in mind that the type of drone ID that this Android application can receive is not the same as DJI's proprietary Aeroscope system. As far as I know, Aeroscope is not relying on any open broadcast protocol.

FYI: There is a list here, which provides more information about the compatibility of different smartphone models with the different variants of the transmission methods of drone ID. The OnePlus 6 does not support receiving NaN signals but I don't know whether DJI eventually will use NaN or Wi-Fi Beacon (or Bluetooth) as their preferred mechanism for the standardized drone ID broadcast signals.

khazov88 commented 2 years ago

so you saying that even warnings during buit of the application it must be functional

friissoren commented 2 years ago

Correct. The application works just fine. I get the same warnings when I build it.

If you have a desktop running Linux or a Raspberry Pi, you can try the Linux transmitter example to test that things are working (or the ESP32 transmitter example, if you have that HW available).