Ok once again, I am in way over my head here while learning android. After finally developing my simple little app, I am trying to use some of the benefits of having a native app.
So, project one, make a page which can send images via email (either from the gallery or camera)
Essentially its a select and send via email, but I don't even know where to start.
I found some code that somebody else was asking about at; Android App Take/ Email Photo
I tried this, but get all sorts of errors from eclipse, replating to downloadedPic section.
If somebody could please take a look and advise me on the best way to do this, that would be amazing. As usual sorry for my beginers stupidity, but I guess everyone has to learn somewhere
THIS IS MY .JAVA AT PRESENT
public class Photos extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_photos);
getActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_photos, menu);
return true;
}
THIS IS MY .XML AT PRESENT
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Please chose the options below to select and upload photos into the
DCC for the selected project..."
tools:context=".Photos"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
Get Your Image First :
Fetch mail address:
Send Click Event :
At The End Photos.java
So Hope Now you Get Full Code.
First what should you do is get the image storage path by using the file,
Then Convert that file path in to
Uri
Finally send it the image via email using your
imageuri
Hope it helps.