Uploading app to Android tablets?

Shohreh

Member
Hello

I have a couple of Android tablets (Archos 70IT and Medion Lifetab P9514) that I'd like to use to run Basic4Android applications but I don't know how to do this:
  • When I hook them up through USB, Windows simply adds them as external disks
  • The B4A IDE just displays the Tools > AVD Manager option, which I guess is only used to run the emulator.

The Android documentation doesn't help much.

How can B4A upload applications to tablets? Do I need to run another SDK application? Do I need some specific USB driver?

Thank you.
 

mc73

Well-Known Member
Licensed User
Longtime User
You have to turn on 'debugging mode' at your tablet, at least, this is how I do it, when I use USB debugging.

Settings->applications->development->enable debugging mode (I am not sure if this is what you'll get on your screen, since mine is in greek language, so I did a translation here).
Perhaps, then, windows will ask you to provide drivers for Archos or whichever else you use. These drivers can usually be found here:
Using Hardware Devices | Android Developers

In case your device is not listed there, you may want to try the OEM drivers, here:
OEM USB Drivers | Android Developers

In my case, it was quite difficult to find the correct driver for a not very popular tablet, so I had to contact the supplier.
 
Upvote 0

Shohreh

Member
Thanks guys for the input.

I found the tablet's Android Debug Bridge (ADB) USB driver, then enabled USB Debugging on the tablet to add an "Other Device" item in Windows 7's Device Manager to get prompted to install the driver. I now have a "Android Phone > Android Composite ADB Interface" item.

For the benefit of other newbies: To increase the odds of finding an Android USB driver for your device, google for "[device model] android debug bridge driver".

Now, let's see if I can upload "Hello World" onto that thing...
 
Upvote 0

Shohreh

Member
A few more questions before hitting the sheets...

1. The tablet's manufacturer says that we should add its "vendor ID to adb_usb.ini in .android folder in your home directory: echo 0x0e79 >> "%USERPROFILE%\.android\adb_usb.ini": Is that necessary?

2. The B4A IDE > Tools section contains "Restart ADB Server". It appears that the ADB Server is needed as an easy and alternative way to upload apps to a device instead of copying it on an SD Card.

When do I need to restart the ADB Server?

The article on Android's site "Using Hardware Devices" (sorry, not allowed to post URLs) says: "You can install your application on the device directly from Eclipse or from the command line with ADB".

Do we need to use the CLI-based adb.exe to upload an application to the device, or does the B4A IDE take care of this?

3. The same article says: "Declare your application as "debuggable" in your Android Manifest. When using Eclipse, you can skip this step, because running your app directly from the Eclipse IDE automatically enables debugging.
In the AndroidManifest.xml file, add android:debuggable="true" to the <application> element. Note: If you manually enable debugging in the manifest file, be sure to disable it before you build for release (your published application should usually not be debuggable)."

Does the B4A IDE take care of this, or must we update the app's AndroidManifest.xml file manually before uploading the app?

4. "When plugged in over USB, can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory.".

The directory only contains adb.exe: Did Google change the name and we must now use options with adb.exe?

5. And for a better understanding of B4A: Does the IDE turn the BASIC source code into Java before calling the Java compiler to generate the bytecode that the DVM will compile through JIT?

Thank you.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You should follow the tutorials and the Beginners guide: http://www.b4x.com/android/documentation.html

1. If that what your manufacturer says then it is probably required.
2. The ADB server (which is part of Android SDK) is not perfect. In some cases restarting it solves communication errors.
3. You do not need to do it.
4. Not sure what you are asking.
5. Yes.
 
Upvote 0
Top