Buscar Fotografia en otra ruta
Publicado por jose (1 intervención) el 09/11/2015 05:29:20
Hola amigos del foro tengo un detalle con este codigo en realidad todo funciona perfectamente pero lo que necesito es que al precionar un boton me busque imagenes en otra ruta que no sea en la Galeria ya que actualmente me busca la imagenes pero en la galeria y yo lo que quiero es que me busque las imagenes es esta ruta
Actualmente estoy trabajando con android y solo necesito eso, mas sin embargo no s donde colocar esa ruta alguien me puede ayudar gracias y saludos
1
/images/fotouno.jpg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
public class EnviarFotoEntrada extends Activity {
private ShareActionProvider myShareActionProvider;
EditText edittextEmailAddress;
EditText edittextEmailSubject;
EditText edittextEmailText;
TextView textImagePath;
Button buttonSelectImage;
final int RQS_LOADIMAGE = 0;
Uri imageUri = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.enviar_foto_entrada);
edittextEmailAddress = (EditText) findViewById(R.id.email_address);
edittextEmailSubject = (EditText) findViewById(R.id.email_subject);
edittextEmailText = (EditText) findViewById(R.id.email_textx);
edittextEmailAddress.addTextChangedListener(commonTextWatcher);
edittextEmailSubject.addTextChangedListener(commonTextWatcher);
edittextEmailText.addTextChangedListener(commonTextWatcher);
textImagePath = (TextView) findViewById(R.id.imagepath);
buttonSelectImage = (Button) findViewById(R.id.selectimage);
buttonSelectImage.setOnClickListener(buttonSelectImageOnClickListener);
Toast.makeText(
getApplicationContext(),
"¡Selecciona tu imagen, y enviala al correo electronico proporcionado por el administrador!",
Toast.LENGTH_LONG).show();
}
TextWatcher commonTextWatcher = new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
setShareIntent(createShareIntent());
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
// TODO Auto-generated method stub
}
@Override
public void onTextChanged(CharSequence s, int start, int before,
int count) {
// TODO Auto-generated method stub
}
};
OnClickListener buttonSelectImageOnClickListener = new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(
Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, RQS_LOADIMAGE);
}
};
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
switch (requestCode) {
case RQS_LOADIMAGE:
imageUri = data.getData();
textImagePath.setText(imageUri.toString());
setShareIntent(createShareIntent());
break;
}
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.enviar_foto_entrada, menu);
MenuItem item = menu.findItem(R.id.menu_item_share);
myShareActionProvider = (ShareActionProvider) item.getActionProvider();
myShareActionProvider
.setShareHistoryFileName(ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME);
myShareActionProvider.setShareIntent(createShareIntent());
return true;
}
private Intent createShareIntent() {
String emailAddress = edittextEmailAddress.getText().toString();
String emailSubject = edittextEmailSubject.getText().toString();
String emailText = edittextEmailText.getText().toString();
String emailAddressList[] = { emailAddress };
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_EMAIL, emailAddressList);
shareIntent.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
shareIntent.putExtra(Intent.EXTRA_TEXT, emailText);
if (imageUri != null) {
shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
shareIntent.setType("image/png");
} else {
shareIntent.setType("plain/text");
}
return shareIntent;
}
private void setShareIntent(Intent shareIntent) {
if (myShareActionProvider != null) {
myShareActionProvider.setShareIntent(shareIntent);
}
}
public void salircom(View v) {
Intent salircom = new Intent(this, Home.class);
startActivity(salircom);
}
}
Actualmente estoy trabajando con android y solo necesito eso, mas sin embargo no s donde colocar esa ruta alguien me puede ayudar gracias y saludos
Valora esta pregunta
0