Reading and writing files from/to private storage. Using a Context you can access the methods
Read more…All snippets tagged with android
Page 4 of 7Reading and writing files from/to private storage
The Ultimate Sharing snippet for social platforms
This recipe contains a big snippet that helps sharing media to various social platforms, and the instructions to set it up. Includes working with the Twitter and Facebook SDKs.
Read more…Share intents
This is a simple collection of sharing intents. There’s a more complete sample here with more advanced options that require the Twitter / Facebook APIs.
Read more…Share a bitmap
Sharing a bitmap requires saving it to file before sharing.
Read more…Launch intents
Various snippets for launching default apps, and more.
Read more…Simple deeplinking
These are instructions to support and test simple deeplinking, without Firebase or the Navigation Components.
Read more…Picking a contact using the Contacts app
There are to ways (besides implementing your own UI) to pick contact details through the Contacts app. One of them needs read access to your contacts list, the other does not.
Read more…Rotate a bitmap according to the file's EXIF data
Loads a bitmap from a file, and applies the rotation that is specified in the EXIF data of the file.
Read more…Glide bitmap transformations
Various bitmap transformations that can be used with Glide to manipulate bitmaps.
Read more…Publish a library to MavenCentral
Birds-eye instructions on how to publish an Android library to MavenCentral.
Read more…Building debug libraries in debug app modules
The following combination of snippets allows you to use different debug and release functionality in a library module depending on the debug/release build type of the parent app module.
Read more…Getting the active flavor and build type at build-time
This is usually not relevant, but when getting creative with your Gralde scripts
it might be handy to know which flavor is being built. Simply putting code
inside a productFlavor
block is not enough to exclude code from running,
e.g. when including code from other scripts.
Automatically update the build number on every release build
This example uses a properties file that holds the build number. On every release build, the version number is increased. By adding the file to version control the build number will consistently increase regardless of which team member builds the release.
Read more…Vector drawable with rounded corners
Simple vector drawable with rounded corners:
Read more…