Clipboard Manager in Android Web View

Inter-workings JavaScript and Java Layer: use Clipboard Manager APIs directly in WebView component of Android library:

// no permission require in your manifest file of Android project


// start code
public class MainActivity extends Activity {
public WebView webView;
ClipboardManager myClipboard;

public void onCreate(Bundle savedInstanceState) {
 setContentView(R.layout.activity_main); // source activity_main.xml
webView = (WebView) findViewById(;
webView.addJavascriptInterface(new WebAppInterface(this), "Android");
webView.setWebViewClient(new WebViewClient());
// important set Web Chrome Client
webView.setWebChromeClient(new WebChromeClient());
webView.loadUrl(url); //local or remote
// final class to add in Web App
final class WebAppInterface {
        Context mContext;

        /** Instantiate the interface and set the context */
        WebAppInterface(Context c) {
            mContext = c;
            Interface to use in web application
	    public void copyToClipboard(String text) {
	        try {
	        	myClipboard = (ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
	        	ClipData myClip;
	        	myClip = ClipData.newPlainText("text", text);
	        	Toast.makeText(getApplicationContext(), "Text Copied",Toast.LENGTH_SHORT).show();
	        } catch (Exception e) {
	        	Toast.makeText(getApplicationContext(), "Copy failed: " + e.toString(), Toast.LENGTH_SHORT).show();

// Now open html file in www folder of you Android project

PrintFriendly and PDF

DOM Canvas HTML5

Image processing algorithm – Greyness canvas with HTML5

PrintFriendly and PDF

PDF Viewer.js

View your PDF files directly in your browser with this useful function in pure JavaScript. Download add-on for browser Firefox and see PDF online Viewer in action – Click here

PrintFriendly and PDF

PDF API HTML5 for WebApps

A condensed library designed to web modern applications, to quickly export your content html to pdf based the famous library in javascript: jsPDF. And a special thanks to the project canvg and html2canvas. To download click here
If you want to download Android app to demo library, get on GooglePlay click on badge below

Get it on Google Play

PrintFriendly and PDF

Get Base64 code JS

Get Base64 code with javascript. Keep all togheter file system drag & drop image and open image from input file.

PrintFriendly and PDF