All snippets tagged with android

Page 4 of 7
 

Reading and writing files from/to private storage

The Ultimate Sharing snippet for social platforms

Share intents

Share a bitmap

Launch intents

Simple deeplinking

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

Glide bitmap transformations

Publish a library to MavenCentral

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.

Read more…

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