import java.io.File ; import android.net.Uri ; import android.os.Bundle ; import android.os.Environment ; import android.view.View ; import android.app.Activity ; import android.content.Intent ; public class MainActivity extends Activity { @Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate(savedInstanceState); setContentView( R . layout . activity_main); View . OnClickListener handler = new View . OnClickListener () { public void onClick ( View v ) { switch (v . getId()) { case R . id . buttonShareTextUrl : shareTextUrl(); break ; case R . id . buttonShareImage : shareImage(); break ; } } }; findViewById( R . id . buttonShareTextUrl) . setOnClickListener(handler); findViewById( R . id . buttonShareIma...