tcgoh Active Member Licensed User Longtime User Jan 14, 2012 #1 Hi, I just get started on B4a and I don't have a android device yet. How do I upload a database file onto the emulator for the SQL view program? Thanks TC
Hi, I just get started on B4a and I don't have a android device yet. How do I upload a database file onto the emulator for the SQL view program? Thanks TC
G glook Member Licensed User Longtime User Jan 14, 2012 #2 You can use adb (Android Debug Bridge). Like this: Start the Basic4Android IDE and your emulator session. From Windows command line - Code: Copy adb push C:\MyProject\MyDatabase.sqlitedb /sdcard/MyDatabase.sqlitedb If adb.exe is not in your Windows Path then you can find it in the platform-tools folder of the Android SDK. Geoff. Edit: This is useful - http://developer.android.com/guide/developing/tools/adb.html Last edited: Jan 14, 2012 Upvote 0
You can use adb (Android Debug Bridge). Like this: Start the Basic4Android IDE and your emulator session. From Windows command line - Code: Copy adb push C:\MyProject\MyDatabase.sqlitedb /sdcard/MyDatabase.sqlitedb If adb.exe is not in your Windows Path then you can find it in the platform-tools folder of the Android SDK. Geoff. Edit: This is useful - http://developer.android.com/guide/developing/tools/adb.html
Erel B4X founder Staff member Licensed User Longtime User Jan 15, 2012 #3 You can also add the file to the Files tab (in the right pane). The file will then be included in the APK file and accessible from File.DirAssets. As databases cannot be opened from this virtual folder you will need to first copy it to a writable location. DBUtils includes a method that copies the file if it doesn't exist. Upvote 0
You can also add the file to the Files tab (in the right pane). The file will then be included in the APK file and accessible from File.DirAssets. As databases cannot be opened from this virtual folder you will need to first copy it to a writable location. DBUtils includes a method that copies the file if it doesn't exist.
tcgoh Active Member Licensed User Longtime User Jan 15, 2012 #4 Thanks. I will try both methods. Upvote 0