Compare commits
4 Commits
e051e66188
...
6c00e63d1f
Author | SHA1 | Date |
---|---|---|
akaessens | 6c00e63d1f | |
akaessens | b37fa14d96 | |
akaessens | c6e25fdcfb | |
akaessens | 1ec5c5ea41 |
|
@ -1,4 +1,6 @@
|
|||
# Changelog
|
||||
## v0.4.4 (14)
|
||||
- Fix Android 11 intents (to open Calendar or Maps)
|
||||
## v0.4.3 (13)
|
||||
- Add spanish translation thanks to @sguinetti
|
||||
- update dependencies
|
||||
|
|
|
@ -7,8 +7,8 @@ android {
|
|||
applicationId "com.akdev.nofbeventscraper"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
versionCode 13
|
||||
versionName "0.4.3"
|
||||
versionCode 14
|
||||
versionName "0.4.4"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.akdev.nofbeventscraper;
|
|||
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
@ -14,6 +15,7 @@ import android.view.WindowManager;
|
|||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
|
@ -116,8 +118,12 @@ public class EventAdapter extends
|
|||
|
||||
Uri intent_uri = Uri.parse(map_search);
|
||||
Intent map_intent = new Intent(Intent.ACTION_VIEW, intent_uri);
|
||||
if (map_intent.resolveActivity(view.getContext().getPackageManager()) != null) {
|
||||
|
||||
try {
|
||||
view.getContext().startActivity(map_intent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast toast=Toast.makeText(view.getContext(),"no App installed", Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -145,8 +151,11 @@ public class EventAdapter extends
|
|||
String desc = event.url + "\n\n" + event.description;
|
||||
intent.putExtra(CalendarContract.Events.DESCRIPTION, desc);
|
||||
|
||||
if (intent.resolveActivity(view.getContext().getPackageManager()) != null) {
|
||||
try {
|
||||
view.getContext().startActivity(intent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast toast=Toast.makeText(view.getContext(),"no App installed", Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -213,7 +222,12 @@ public class EventAdapter extends
|
|||
share_intent.setType("text/plain");
|
||||
share_intent.putExtra(Intent.EXTRA_TEXT, event.url);
|
||||
|
||||
view.getContext().startActivity(Intent.createChooser(share_intent, null));
|
||||
try {
|
||||
view.getContext().startActivity(share_intent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast toast=Toast.makeText(view.getContext(),"no App installed", Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ buildscript {
|
|||
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.2'
|
||||
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
- Fix Android 11 intents (to open Calendar or Maps)
|
Loading…
Reference in New Issue