Android Question Designer won't connect with Emulator V2.71

floatingpoint

Member
Licensed User
Longtime User
Been away a while but just had a request to make some cosmetic changes to an app.

Fired up B4A, then AVD then chosen emulator that was previously working.
Then Designer and trying to connect it goes away for a few seconds, flashes the emulator screen but comes back always 'Status Disconnected'

I have tried reloading Java JDK, SDK but no change.

BTW I am staying with V2.71 ATM since after upgrading, I found that my USB Accessory comms was broken.

Any ideas greatly appreciated.

FP
 

floatingpoint

Member
Licensed User
Longtime User
Have you tried to create a new emulator?


I highly recommend you to upgrade to the latest version.

Yes, I have tried creating a new emulator.
On the first attempt at connecting, the designer momentarily displays 'connected' but then falls back to 'disconnected'

I also have upgraded to V3.82 but this doesn't solve this issue.

I did recently upgraded Java on my machine and agreed to delete old versions but have since re-installed java 1.7.0.71

Could this have anything to do with it?

FP
 
Upvote 0

floatingpoint

Member
Licensed User
Longtime User
It is not related to Java.
I recommend you to avoid using the emulator at all. It is slow and unreliable. Either use a real device or a virtual machine such as Genymotion.

Thanks Erel,

Once again, amazingly fast response to what you must regard as trivial questions!

I have a solution!

I did join and load up Genymotion but haven't used it yet.
I tried one last action of deleting all emulators and adding a new one.
This worked!

Now I still had problem of USB Accessory broken comms which I managed to solve:
In B4A V3.82 the packet headers are handled differently:

Gone is my V2.71 limit of 63 bytes Rx - that is good.
However the V3.82 AsyncStream Rx buffer now contains the 4 length bytes at the start. (V2.71 had stripped these)
The V3.82 AsyncStream Tx packet now does not contain the 4 length bytes at the start. (V2.71 did included these)

This seems a little weird but I hope that this won't be changing back because I have modified my USB Host firmware accordingly...

FP
 
Upvote 0

floatingpoint

Member
Licensed User
Longtime User
It is not related to B4A version. Read the tutorial about AsyncStreams. You need to use the standard mode instead of prefix mode.

erel,

Thank you again.

Yes, I had forgotten that I had already changed to AsyncStreams standard mode in the process of debugging the USB Accessory.
I've stripped off the unnecessary prefixes and all working well.

FP
 
Upvote 0
Top