Back to project page SmartPass.
The source code is released under:
Copyright (c) 2013 Dax Earl, Aaron Golliver Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal ...
If you think the Android project SmartPass listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.smartpass; /* w w w. j av a 2 s.c om*/ import android.app.Activity; import android.content.ClipData; import android.content.ClipboardManager; import android.os.Bundle; import android.view.Menu; public class ClearClipboard extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_clear_clipboard); ClipData cd = ClipData.newPlainText("", ""); ClipboardManager cm = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); cm.setPrimaryClip(cd); ((Activity) this).finishAffinity(); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.copy_to_clipboard, menu); return true; } }