Android Question B4A Bridge 2.12 not working on some apps (B4A5.02)

Discussion in 'Android Questions' started by goldmagnet, Jul 18, 2015.

  1. goldmagnet

    goldmagnet Member Licensed User


    I have been working on an app for about 3 months and just recently it will no longer deploy with b4a bridge. Other apps I am writing do deploy to devices but this project now will not. All looks OK and the IDE seems to think its OK but the device does nothing then after exactly 60 seconds both the IDE and the bridge screen on the device show a disconnection and an immediate reconnect.

    The APK is fine.

    Any ideas ?

  2. goldmagnet

    goldmagnet Member Licensed User

    To confirm the apk manually copied to the device installs and runs fine.
  3. Erel

    Erel Administrator Staff Member Licensed User

    Moved to the questions forum.

    Have you tried to uninstall the existing app from the device?
  4. goldmagnet

    goldmagnet Member Licensed User

    Yes I have done that, I have also rebooted both the devices and the PC running the IDE. There are no crashed instances of the IDE or designer. If I use just the USB connection everything is fine. Happens on new android devices as well, this certainly appears to be a bug why is it now moved to questions ?

    To recap the same APK runs fine when manually copied, a different project will deploy on the same device, direct connection with USB also works. I have tried on a virgin android device and see the same results.

    I searched the forum before I reported this, and found a thread where the same thing has been reported but also has not yet been resolved.

  5. goldmagnet

    goldmagnet Member Licensed User

    As I need to get on I restored the project back 1 day and tried again, it now works fine, nothing else changed.

    I am now adding the code again and testing as I go.

  6. Erel

    Erel Administrator Staff Member Licensed User

    How are you installing it manually?

    This is most probably not a bug in B4A-Bridge. All B4A-Bridge does is to send an intent to the system asking it to install the APK file. There is nothing more that it can do.
  7. goldmagnet

    goldmagnet Member Licensed User

    Hi Erel

    I copied the APK from the objects folder to the same device and ran it from the file manager of the device, it installed fine. As I mentioned it also works fine with the USB cable connection, so the only difference I can see is the bridge, by pass the bridge and it all works ?
  8. Erel

    Erel Administrator Staff Member Licensed User

    What is the size of the APK file? Are there any relevant messages in the logs?
  9. goldmagnet

    goldmagnet Member Licensed User

    The size of the APK is 16 megabytes (plenty of free space on test devices). There are no relevant entries in the log (unfiltered) and the project compiled fine, the only clues I can find:

    1. The 60 second delay after compiling when other bridge and IDE show a disconnect then a reconnect, that was consistent.
    2. Reverting the code to a version from yesterday morning allowed everything to function as normal (reverting to a backup of the code was the only change).
    3. Other projects deployed to the device fine, at the same time as the issue with this project.
    4. The last code change was to delete a section of code that referenced files included in the project, I removed the code and the files, complied and the issue started.

    As I mentioned reverting to the backup has stopped the issue occurring, and I have since put back most of the code and no further issues.
  10. Erel

    Erel Administrator Staff Member Licensed User

    Try to increase the process timeout value (Tools - IDE Options - Configure process timeout). If the file transfer takes too long it can break the connection.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice