vb.net - android: transfer sqlite database from pc to device via usb programatically -
vb.net - android: transfer sqlite database from pc to device via usb programatically -
the situation this. have application written in vb.net. consists or 2 parts. 1 on pc , other on handheld windows mobile 6 device . desktop programme transfers sqlserver compact database , handheld device using activesync via usb. potentially want having android handheld devices supported application. know can utilize sqlite .net. know can utilize adb force , pull info (and hence database files) , device.
what need know can access adb straight vb.net api or sdk rather having manually.
unless of course of study i'm missing , can re-create databases , device in other way?
thanks in anticipation
there's no direct api that. have similar scenario, user syncs content (i.e. database) desktop client (in our case java swing based), utilized adb manually , it's working fine far.
in our java client, we'd call:
private static final string adb_push = "\"" + utility.getworkdir() + file.separator + "adb\" -s %s force \"%s\" %s"; /** * pushes file connected device via adb * @param deviceid device serial number * @param path of source file (on pc) * @param path of file destination (on device) */ public static void push(string deviceid, string from, string to) { seek { string cmd = string.format(adb_push, deviceid, from, to); system.out.println("adb push: " + cmd); process p = runtime.getruntime().exec(cmd); inputstream = p.getinputstream(); inputstreamreader isr = new inputstreamreader(is); bufferedreader br = new bufferedreader(isr); string line; while ((line = br.readline()) != null) { system.out.println("adb: " + line); } } grab (ioexception e) { system.out.println(e); } } android vb.net usb
Comments
Post a Comment