|
Coming in Domino To Go 1.2: take photos with the iPhone or iPad camera and attach it to a NotesDocument - and general attachment support
You know our solution for developing native, offline capable mobile Apps for iPhone, iPad and Android (in the near future), do you? If not, click here to learn about Domino To Go!.
We are working on version 1.2 of Domino To Go. While we already had some support for downloading Notes document attachments to the mobile iOS device, there was room for improvement. Furthermore, we didn't had a sample for using the camera and attaching a photo to a Notes document. So in version 1.2 of Domino To Go, there will be a lot of improvements in this area. Using the camera There are many usecases where you want to use the camera of your iPhone, iPad or Android device to take a photo and attach this photo to a specific Notes document. Actually that means you want to take the photo, store it on the mobile device, upload it to your Lotus Notes or XPages application and attach it to a Notes document in that application. If you dig down into this requirement, there is a lot of complicated stuff to handle, like wrapping the file in base64 encoding, upload to Domino, decode it again and store it in a notes item, or uploading multiple files for multiple documents. In Domino To Go 1.2, you will be able to solve this usecase with code like this: So you only need to:
And when the next synchronization between the mobile device and Domino runs (that is, when a method called NotesDatabase.uploadChanges() is executed), the files will be uploaded and attached to the appropriate NotesDocument. You can attach multiple files to the same document, even to the same notes item in the document. The upload process is robust, if there is a network problem then the files that has not been transferred so far will be uploaded again in the next sync. More Attachment Handling You will be able to use NotesDocument.setAttachment() for any kind of files, not only those take from the camera. Furthermore, there will be the option to download attachments from a NotesDocument to the mobile device, and to work with the attachment on the mobile device. So alltogether, there will be the following new methods in Domino To Go 1.2: NotesDocument.setAttachment(filename, itemname) NotesDocument.getAttachment(filename) NotesDocument.removeAttachment(filename) No Worries The three methods above is all you need, you don't need to worry about how to upload, download and store file attachments on the mobile device. Domino To Go does it all for you. I don't think it can get easier than that :-) Read more about Domino To Go!. |
