-
- All Implemented Interfaces:
public final class ActivityAccessKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static DisplayMetricsdisplayMetricsprivate final static LayoutInflaterlayoutInflater
-
Method Summary
Modifier and Type Method Description final DisplayMetricsgetDisplayMetrics()final LayoutInflatergetLayoutInflater()final static Single<List<Address>>geocode(ActivityAccess $self, String address, Integer maxResults)Returns a list of Addresss matching the given latitude and longitude. final static Single<List<Address>>geocode(ActivityAccess $self, Double latitude, Double longitude, Integer maxResults)Returns a list of Addresss matching the given latitude and longitude. final static Unitshare(ActivityAccess $self, String title, String message, String url, Image image)Open a sharing dialog. final static BooleanopenUrl(ActivityAccess $self, String url, Boolean newWindow)Open a URL final static UnitopenAndroidAppOrStore(ActivityAccess $self, String packageName)Open a particular app by package name, or the app store if it is not present. final static UnitopenMap(ActivityAccess $self, Double latitude, Double longitude, String label, Float zoom)Shortcut to open the map to a particular location. final static UnitopenEvent(ActivityAccess $self, String title, String description, String location, ZonedDateTime start, ZonedDateTime end)Shortcut to open an event form in your calendar, prepopulated. final static Single<Location>requestLocation(ActivityAccess $self, Double accuracyBetterThanMeters)Gets a single location update from the users. final static Observable<Location>requestLocationStream(ActivityAccess $self, Double accuracyBetterThanMeters)final static Maybe<List<Uri>>requestImagesGallery(ActivityAccess $self)Starts a new activity to get images from the gallery. final static Maybe<Uri>requestImageGallery(ActivityAccess $self)Starts a new activity to get an image from the gallery. final static Maybe<Uri>requestImageCamera(ActivityAccess $self, Boolean front)Starts a new activity to get an image form the camera. final static Maybe<Uri>requestVideoGallery(ActivityAccess $self)Starts a new activity to get a video from the gallery. final static Maybe<List<Uri>>requestVideosGallery(ActivityAccess $self)Starts a new activity to get videos from the gallery. final static Maybe<Uri>requestVideoCamera(ActivityAccess $self, Boolean front)Starts a new activity to get a video from the camera. final static Maybe<List<Uri>>requestMediasGallery(ActivityAccess $self)Starts a new activity to get images and videos from the gallery. final static Maybe<Uri>requestMediaGallery(ActivityAccess $self)Starts a new activity to get an image or video from the gallery. final static Maybe<Uri>requestFile(ActivityAccess $self)Starts a new activity to get a file. final static Maybe<List<Uri>>requestFiles(ActivityAccess $self)Starts a new activity to get files. final static StringgetMimeType(ActivityAccess $self, Uri uri)Shortcut to get the MIME type of the given uri. final static StringgetFileName(ActivityAccess $self, Uri uri)Shortcut to get the file name of the given uri. final static StringgetString(ActivityAccess $self, Integer resource)A shortcut for getting resources. final static IntegergetColor(ActivityAccess $self, Integer resource)A shortcut for getting resources. final static CompletablerequirePermission(ActivityAccess $self, String permission)Request a permission on an activity, but as a Single. final static CompletablerequirePermissions(ActivityAccess $self, Array<String> permissions)Request a permission on an activity, but as a Single. final static UnitstartIntent(ActivityAccess $self, Intent intent, Bundle options)Creates a single that starts an intent and listens for the result. final static Single<ActivityResult>startActivityForResult(ActivityAccess $self, Intent intent, Bundle options)Creates a single that starts an intent and listens for the result. -
-
Method Detail
-
getDisplayMetrics
final DisplayMetrics getDisplayMetrics()
-
getLayoutInflater
final LayoutInflater getLayoutInflater()
-
geocode
final static Single<List<Address>> geocode(ActivityAccess $self, String address, Integer maxResults)
Returns a list of Addresss matching the given latitude and longitude.
-
geocode
final static Single<List<Address>> geocode(ActivityAccess $self, Double latitude, Double longitude, Integer maxResults)
Returns a list of Addresss matching the given latitude and longitude.
-
share
final static Unit share(ActivityAccess $self, String title, String message, String url, Image image)
Open a sharing dialog.
-
openUrl
final static Boolean openUrl(ActivityAccess $self, String url, Boolean newWindow)
Open a URL
-
openAndroidAppOrStore
final static Unit openAndroidAppOrStore(ActivityAccess $self, String packageName)
Open a particular app by package name, or the app store if it is not present.
-
openMap
final static Unit openMap(ActivityAccess $self, Double latitude, Double longitude, String label, Float zoom)
Shortcut to open the map to a particular location.
-
openEvent
final static Unit openEvent(ActivityAccess $self, String title, String description, String location, ZonedDateTime start, ZonedDateTime end)
Shortcut to open an event form in your calendar, prepopulated.
-
requestLocation
final static Single<Location> requestLocation(ActivityAccess $self, Double accuracyBetterThanMeters)
Gets a single location update from the users. Handles permissions by itself.
-
requestLocationStream
final static Observable<Location> requestLocationStream(ActivityAccess $self, Double accuracyBetterThanMeters)
-
requestImagesGallery
final static Maybe<List<Uri>> requestImagesGallery(ActivityAccess $self)
Starts a new activity to get images from the gallery. Handles permissions by itself.
-
requestImageGallery
final static Maybe<Uri> requestImageGallery(ActivityAccess $self)
Starts a new activity to get an image from the gallery. Handles permissions by itself.
-
requestImageCamera
final static Maybe<Uri> requestImageCamera(ActivityAccess $self, Boolean front)
Starts a new activity to get an image form the camera. Handles permissions by itself.
-
requestVideoGallery
final static Maybe<Uri> requestVideoGallery(ActivityAccess $self)
Starts a new activity to get a video from the gallery. Handles permissions by itself.
-
requestVideosGallery
final static Maybe<List<Uri>> requestVideosGallery(ActivityAccess $self)
Starts a new activity to get videos from the gallery. Handles permissions by itself.
-
requestVideoCamera
final static Maybe<Uri> requestVideoCamera(ActivityAccess $self, Boolean front)
Starts a new activity to get a video from the camera. Handles permissions by itself.
-
requestMediasGallery
final static Maybe<List<Uri>> requestMediasGallery(ActivityAccess $self)
Starts a new activity to get images and videos from the gallery. Handles permissions by itself.
-
requestMediaGallery
final static Maybe<Uri> requestMediaGallery(ActivityAccess $self)
Starts a new activity to get an image or video from the gallery. Handles permissions by itself.
-
requestFile
final static Maybe<Uri> requestFile(ActivityAccess $self)
Starts a new activity to get a file. Handles permissions by itself.
-
requestFiles
final static Maybe<List<Uri>> requestFiles(ActivityAccess $self)
Starts a new activity to get files. Handles permissions by itself.
-
getMimeType
final static String getMimeType(ActivityAccess $self, Uri uri)
Shortcut to get the MIME type of the given uri.
-
getFileName
final static String getFileName(ActivityAccess $self, Uri uri)
Shortcut to get the file name of the given uri.
-
getString
final static String getString(ActivityAccess $self, Integer resource)
A shortcut for getting resources.
-
getColor
final static Integer getColor(ActivityAccess $self, Integer resource)
A shortcut for getting resources.
-
requirePermission
final static Completable requirePermission(ActivityAccess $self, String permission)
Request a permission on an activity, but as a Single. Permissions come from android.Manifest.permission.
-
requirePermissions
final static Completable requirePermissions(ActivityAccess $self, Array<String> permissions)
Request a permission on an activity, but as a Single. Permissions come from android.Manifest.permission.
-
startIntent
final static Unit startIntent(ActivityAccess $self, Intent intent, Bundle options)
Creates a single that starts an intent and listens for the result.
-
startActivityForResult
final static Single<ActivityResult> startActivityForResult(ActivityAccess $self, Intent intent, Bundle options)
Creates a single that starts an intent and listens for the result.
-
-
-
-