I'm working on app that have number of imageviews,
when i click on the image i want it to open via android default gallery image picker.
i've tried in this way :
String str = "android.resource://" + getPackageName() +"/"+R.drawable.wall1;
Uri path = Uri.parse(str);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(path, "image/*");
startActivity(intent);
I think this is a basic question. Is there any option to stop an activity by using intent.
Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:5554"));
startActivity(intent);
This is my code. I would like to stop this activity (That means, i want to drop this call) if the user is busy or something. What can I do for that?
I need your help, I've been looking for an answer all day with no luck.
does anyone know to can i start intent with VIEW action for a specific sim contact by path of the contact?
I have tried to do something like this:
Uri simUri = Uri.parse("content://icc/adn");
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.withAppendedPath(simUri, contactID));
startActivity(intent);
but appar
I would like to open just one image and have pitch-zoom function, so (as I think) easiest way to do that is to open that image in gallery intent.
I'm trying to open a zip file from my aplication, but it doesn't works
Uri uri = Uri.parse("file:///mtn/sdcard/download/teste.zip");
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);
I've already tried other options like:
File file = new File("mnt/sdcard/download/teste.zip");
Intent it = new Intent();
it.setAction(android.content.Intent.ACTION_VIEW);
Below here in code startActivity(intent) gives me an error
Here's my code:
public class MyWebViewClient3 extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (Uri.parse(url).getHost().equals("www.facebook.com")) {
// This is my web site, so do not override; let my WebView load the page
return false;
what are the reasons that would affect my intent not to load the next activity i've fixed my manifest the intent is correct the button is okey and the activity is good basically i don't have any errors or i don't see any can anyone clear this things for me i need help..this is my intent if you would like to check it
final Intent intent = new Intent();
intent.setClass(MainActivity.this
I am having trouble when I try to pass a text string from within an EditText to either Facebook or Twitter via an intent.
I am passing strings as intent extras, the following method is passed parameters containing the information I wish to pass via intent, I can see that the values in "mc" and "title" are as they should be in toasts:
private void addProximityAlert(int id, Double latitude, Double longitude, String title, String mc) {
Intent intent = new Intent(PROX_ALERT_INTENT);
intent.putExtra("id