Open MikeWoots opened 6 years ago
Got same issue like you today. Are you still using SDK v4.3.2 like me?
I experienced this issue on v4.4.1
I have spent several hour to work around it, but still have no idea. It is strange that connection is all good on another demo, which has almost the same structure with the current one.
It is difficult to debug because you have to have your device connected to the remote via USB and using DJI bridge won't work to debug either. I think disconnecting the remote must be breaking the SDK but haven't been able to find a way to record the logs yet.
Well, I work around the debug problem via wifi adb. There is a AS plugin named WIFI ADB ULTIMATE. You can connect to mobile device via IP address and port number after plugging the USB cable into remote controller. And then all logs are avaliable in the Logcat.
Thanks, I had forgotten about wifi adb. Will test it again today and see if I can pick up anything in the logs
Have you tried using wifi adb? Whenever I connect to the drone remote via usb I get disconnected from the wifi adb connection.
Yes, that's the way it is. Connecting to remote controller will Interrupt the wifi adb connection if adb is already connected. And you need to reconnect to wifi adb, then you can get both drone and mobile device status the same time.
FWIW, I am encountering the same problem, running Android 7.0 with both v4.3.2 and v4.4.1
Same here, running Android 8.1.0 and DJI SDK 4.4.1, using the exact startSDKRegistration() method from the sample, app registration works great but then startConnectionToProduct() returns false AND onProductChange() is not called when connecting to the drone...
I still haven't found a solution to this. Would be great to get some feedback from DJI.
Still broken with SDK 4.5.
@jacobsenmd We are able to reproduce this on our side now. Will fix this soon and keep this thread posted.
Any progress on this issue? It wastes lots of time and seems to be random.
I also have this problem. Is there a solution
Hey everyone, I had the same problem. It turned out that somehow the onRegister method returned a DJISDKError.REGISTRATION_SUCCESS although registering failed (the problem was that my phone wasn't connected to the internet). So if you make sure you have an internet connection when doing the first register call the product connects.
At least this worked for me.
The same happens to me with Crystal Sky, DJI SDK 4.8.1. Has anyone got any clue as to why this is happening and how we can fix it?
Still broken with SDK 4.8. Any solution?
Well, I worked around it a year ago. Simply by removing the dependency of JPush SDK, a third-party message push platform. But I don't think it's a universal solution for all developers who are facing this problem. DJI SDK registration process seems to be blocked by some third-party develop kit. Maybe you could try to work around it on this aspect.
I described my workaround for this issue in issue #479
Essentially setting your main activity android:launchMode = "singleTop"
ensures that the existing instance of the activity will receive the USB connection Intent, which you can pass along to the SDK to ensure that the SDK reinitializes correctly on USB unplug / replug.
2 years later and the error still exists in version 4.13.1 with Android 9. Any updates?
@talobin SDK 4.15, and more than 3 years later this issue is still open. Any reason why there is no progress on this even though you were able to reproduce this on your side?
When will this "soon" arrive?
OBS: also got this issue on Android 11
I am having an issue with connecting to the drone which only seems effect devices running Android 7.
Description: The first time I compile and install the app on my device I can connect to the drone perfectly. However, if I then either turn off the remote or unplug the USB cable and try then reconnect again the connection fails. onProductChange in DJISDKManager.SDKManagerCallback is not called.
How to replicate: 1) Turn on drone and keep powered on for entire test 2) Turn on remote and connect to DJI SDK 3) Turn off remote 4) Turn on remote back on and try reconnect 5) Connection then fails, in particular onProductChange is not called
Phantom 4 Android 7.0