[TIMOB-1799] Android: Add API Support for Clipboard
|Fix Version/s||Release 1.5.0|
See ticket #648 Creating an android specific ticket for better tracking.
Feature from Brion
Spent a little weekend hacking time and threw together a quick
port of the Titanium.UI.Clipboard module interface from
http://github.com/brion/titanium_mobile/tree/clipboard">http://github.com/brion/titanium_mobile/tree/clipboard API docs, KitchenSink demo, Android, and iOS implementations are on that branch in separate commits.
The Android clipboard is limited to plaintext, which appears to work nice enough in my initial testing.
On iOS, in addition to text, there is theoretical support for URLs (marked as 'URL' or 'text/uri-list' as per Desktop, and using strings on our side) and images (as 'image' or actual MIME type). I haven't actually tested these code paths yet. :) Other data types may or may not be properly converted by the system libraries from the MIME type to the native clipboard UTI, and will also expect data in blob form.
- Don Thorp 2011-04-15
Note: There is an example in KS at the end of the platforms tab.
- Jeff Haynie 2011-04-15
(from [1cb0d8d9924777ca851e3192e395dc975f23a7fd]) [#1799 state:fixed-in-qa] Initial Ti.UI.Clipboard module for Android, following the Ti.UI.Clipboard API from Titanium Desktop.
Since the Android clipboard only appears to support plain text strings, only text is supported. The getData(), setData(), and hasData() functions will pass text through if given 'text/plain', and otherwise do nothing.
- Thomas Huelbert 2011-04-15
220.127.116.1135b3 g1 1.6, 2.2 sim. new record for iOS parity