Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package ab.cd; import java.io.BufferedInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; /* * program to send email with an jpeg attached... * similarly you can attach anything you want just make sure u r using the correct Type */ public class SendMail extends Activity { Intent sendIntent; private File file; private Thread t; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); findViewById(R.id.Button01).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { t.start(); t.stop(); } }); t= new Thread(new Runnable() { @Override public void run() { file=getFile(); Log.i("absol path", "file://"+file.getAbsolutePath()); sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Subject"); Log.i("parsing of URI", "start"); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+file.getAbsolutePath())); Log.i("parsing of URI", "stop"); sendIntent.setType("image/jpeg"); startActivity(Intent.createChooser(sendIntent, "MySendMail")); } }); } private File getFile() { File f = null; String picstring= "http://wefunction.com/wp-content/uploads/2008/07/function_twitter_free.jpg"; try { // Create file f=new File(Environment.getExternalStorageDirectory(), "outfile2.jpeg"); InputStream inputStream= new BufferedInputStream(new URL(picstring) .openStream(), 1024*4); OutputStream out=new FileOutputStream(f); byte buf[]=new byte[1024]; int len; while((len=inputStream.read(buf))>0) out.write(buf,0,len); out.close(); inputStream.close(); System.out.println("\nFile is created"); } catch(Exception e){ e.printStackTrace(); } return f; } }