Hi all, One feature currently missing in b2g is a way to manage/backup/restore data from the phone on a host computer. There are various scripts floating around, but they are no substitute for a real end-user oriented solution. Here's a rough proposal on how to build that functionality.
First of all, no UI should be chrome UI: both the host and the device applications will be web applications with the appropriate privilege level, even if the host application will very likely run in a Firefox tab. Basic UX flow possible (Josh, I remember you showed me wireframes, can you post them somewhere for our enlightenment?): 1. Plug in your phone with the setting "enable backup/restore" checked. 2. Open the host application. 3. This will launch the device application. 4. On the host, choose whatever you want to backup/restore. On the technical side: 1. The "enable backup/restore" settings enables a debugging protocol actor that will listen to connections on port 4343. On the host, we forward the 4343 and 4344 ports trough adb. 2. The host application connects to the device by opening a socket to localhost:4343. 3. The backup actor then sends a system message to wake up the backup application. Once this application is running and listening on port 4344, it sends back an ack to the host application. 4. The host application checks that the device app is running by trying to open a connection on locahost:4344. 5. Once this is done, host and device use a custom protocol to exchange data. The host application saves everything using indexedDB. On the device, the backup application could access data like contacts, sms, etc. directly itself, but will also use the datastore and/or the inter application communication apis to gather data from other applications. This will let users backup and restore data from 3rd party applications. On b2g the system application could provide the backup functionality, but I like the idea of a dedicated application better, because that will let us support Android as well. Thoughts? Fabrice -- Fabrice Desré b2g team Mozilla Corporation _______________________________________________ dev-b2g mailing list dev-b2g@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-b2g