• Stars
    star
    260
  • Rank 157,189 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created over 12 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android Development Utils

QuickUtils

QuickUtils Maven Central Android Arsenal

This repository offers a set of random useful classes to deal with repetitive tasks in the Android Framework. Intended to help you getting your Android applications off the ground quickly, by offering ready-to-use components and utility classes that wrap a lot of the boilerplate that’s involved when writing Android apps.

Header

Main features

  • REST - Simple REST requests and automatic parse
  • Cache Magic - Easily serialize and cache your objects to disk using key/value pairs
  • Async Image Loader - Image downloading and caching

Installation

Including in your project via Gradle:

dependencies {
    compile 'com.cesarferreira.quickutils:library:2.+'
}

Usage

Init the library in your Application class

public class SampleApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        QuickUtils.init(this);
    }
}

REST

Simple REST requests and automatic parse

Gson Entity

public class Tweet {
    @SerializedName("title")
    public String title;
    @SerializedName("amount_of_retweets")
    public long retweetsTotal;
}

The Request

 QuickUtils.rest.connect()
            .GET() // POST() // PUT()
            .load("https://path/to/the/tweets")
            .as(new TypeToken<List<Tweet>>() {})
            .withCallback(callback);

Post with Header and Body params

Header requestHeader = new Header.Builder()
                .add("Authorization", "Bearer Jhahdau2819ajsbdkasdkasdkashjdkahs")
                .build();

Body requestBody = new Body.Builder()
            .add("email", "[email protected]")
            .build();

QuickUtils.rest.connect()
            .POST(requestHeader, requestBody)
            .load(url)
            .as(new TypeToken<List<Person>>() {})
            .withCallback(callback);

Cache magic!

Easily serialize and cache your objects to disk using key/value pairs.

Save

sync

QuickUtils.cacheMagic.save("somePerson", new Person("john doe"));

async

QuickUtils.cacheMagic.save("somePerson", new Person("john doe"), new SaveToCacheCallback() {(...)});

Read

sync

QuickUtils.cacheMagic.read("somePerson", null);

async

QuickUtils.cacheMagic.readAsync("somePerson", new TypeToken<Person>() {}, new ReadFromCacheCallback<Person>() {(...)});

Delete

QuickUtils.cacheMagic.delete("somePerson"); // deleteAsync also works

Erases ALL the key/values that are stored

QuickUtils.cacheMagic.deleteAll();

Exists

Check if a key/value exists

boolean personExists = QuickUtils.cacheMagic.existsKey("somePerson");

Async Image Loader

Image downloading and caching

// Simple
QuickUtils.imageCache.load(IMAGE_URL, imageView);

// or more complete
QuickUtils.imageCache.load(IMAGE_URL, imageView, R.drawable.dummy, R.drawable.error);

Using the util methods

All you need to do is to specify the category and the method you want to use.

QuickUtils.__category__.__method__

E.g.

// Log something
QuickUtils.log.e("this is an error");
// Make the smartphone vibrate for the amount of time you want
QuickUtils.system.vibrate(1000);
// Convert pounds to KG
QuickUtils.math.poundsToKg(weight);
// Does that file exists?
QuickUtils.sdcard.exists(someFile);
// Encode a string
QuickUtils.security.encodeBase64(someString);
// Save data
QuickUtils.prefs.save(key, value);
// Retrieve saved data
QuickUtils.prefs.getString(key, defaultValue);
QuickUtils.prefs.getInt(key, defaultValue);
// Remove saved data
QuickUtils.prefs.remove(key);
//  Etc. (hundreds more methods)

More Documentation

Take a look at our wiki.

Contributing

Contributions welcome via Github pull requests.

License

QuickUtils is available under the MIT license. See the LICENSE file for more info.

More Repositories

1

dryrun

☁️ Try the demo project of any Android Library
Ruby
3,825
star
2

SwiftEventBus

A publish/subscribe EventBus optimized for iOS
Swift
1,100
star
3

drone

🍰 The missing library manager for Android Developers
JavaScript
516
star
4

alfi

Android Library Finder
Ruby
503
star
5

RxPeople

Observing people... wait what?
Java
424
star
6

colorize

Access to 1000+ colors on android!
Java
410
star
7

CatKit

Android kit for cat placeholders 🐱
Java
270
star
8

purrge

🐱 Quickly purrge android apps from your phone
JavaScript
186
star
9

RxPaper

Reactive extension for NoSQL data storage on Android
Java
176
star
10

android-rocket-launcher

πŸš€ Launch android modules from the terminal
Kotlin
164
star
11

gradlr

πŸŒ€ Fastest auto complete for gradle tasks
JavaScript
152
star
12

MaterialComponent.Banner

Material component for Android: Banner
Kotlin
115
star
13

international

Tool to convert CSV to localization specific files (ios/android)
Ruby
101
star
14

j2j

Convert any file.json to the corresponding mapped java files
Ruby
64
star
15

faker

A kotlin extension to load images asynchronously on android
Kotlin
58
star
16

kotlin-pluralizer

β˜€οΈ Kotlin extension to pluralize and singularize strings
Kotlin
50
star
17

react-native-logcat

⚑ Colored Logcat for react-native android
Ruby
48
star
18

tempo

⌚Kotlin intuitive Date extensions.
Kotlin
39
star
19

seguro

Secure persistence using AES+CBC encryption on Android with no dependencies.
Kotlin
35
star
20

flutter-architecture-example

Easy Flutter architecture using dependency injection (DI) + BLoC + State Manager + Repository Pattern
Dart
30
star
21

jsonify

Convert any Java object to JSON for easier debugging
Java
27
star
22

git-gud

:octocat: Tool to enhance your github workflow
JavaScript
26
star
23

goplaces

πŸ’ͺ Launch apps on your phone/emulator from the terminal
JavaScript
26
star
24

monzo-cli

πŸ’³ Monzo bank command line interface client
Ruby
26
star
25

gito

⚑ git helper tool to clone/open/auto-install/edit with a one-liner
Ruby
26
star
26

interactive-git-tag

:octocat: Interactive tool that helps with your git tagging by suggesting versions
JavaScript
25
star
27

facelift

Quick github-pages generator
JavaScript
24
star
28

lasertag

Automatically map android app versions to git tags
Ruby
24
star
29

generator-android-library

Boilerplate code for creating an android library
JavaScript
23
star
30

open-on-android

Open anything on your android phone
JavaScript
22
star
31

tray-apk-install

πŸ’Ž Fastest way to install APKs
JavaScript
19
star
32

Pretender

Lorem Ipsum, but for people [android]
Java
18
star
33

clean-idea

Fastest way to cleanup your IntelliJ IDEA files
Ruby
16
star
34

android-latest

Latest android versions for developers (buildTools, TargetSdk, etc.)
HTML
14
star
35

android-unique-device-id

Generate a 64-bit hex string as an unique Android ID
Kotlin
14
star
36

awsnap

πŸ„ Generate beautiful screenshots
JavaScript
13
star
37

node-adb-api

A node API for adb (android debug bridge)
JavaScript
12
star
38

yap-json

πŸ‹ Lightweight colorized JSON prettifier for the terminal
JavaScript
12
star
39

apu

β˜• Set of useful tools for android developers
Ruby
11
star
40

PainlessPrefs

Static way to use android preferences, no hassle
Java
11
star
41

UIState

Cleanest way of representing UI state in a flutter widget.
C++
11
star
42

pod-tools

Set of Cocoapods tools (clean, reinstall, clean derived data)
Ruby
9
star
43

oh

Quickly open any app in the folder you're currently in (Open Here)
JavaScript
8
star
44

lgtv-cli

CLI to control LG TV with WebOS
JavaScript
7
star
45

drone-hive

Companion repository for https://github.com/cesarferreira/drone
JavaScript
7
star
46

robin

JSON driven CLI tool
JavaScript
6
star
47

UserAgentForAndroid

Easily add app context to your android API calls
Kotlin
5
star
48

timecop

Static way to count time in android
Java
4
star
49

readme-senpai

Pretty prints markdown in the terminal given a gituhub username/repo
JavaScript
4
star
50

generator-node-skeleton

A yeoman generator for node modules
JavaScript
3
star
51

clap-detector-android

Kotlin
3
star
52

generator-node-cli-skeleton

A yeoman generator for a node cli app
JavaScript
3
star
53

node-time-log

console.log() with a beautiful timestamp
JavaScript
3
star
54

fpm

WIP - Flutter Package Manager
Dart
3
star
55

myboy

CSS
2
star
56

chef-cli

Quickly convert things into other things
JavaScript
2
star
57

insta-story

Creates an instagram story like UI
Kotlin
2
star
58

foodbot

A slack bot that knows what street food is available @ Paddington Central
JavaScript
2
star
59

generator-kotlin-mvp-dagger

generator-kotlin-starterkit
Kotlin
2
star
60

better-version

Kotlin
2
star
61

mvvm-arch-components-click-handling

Sample with MVVM google architecture components click handling
Kotlin
2
star
62

kotlin-dagger2-LettersAndNumbers

Example of Android project showing integration with Kotlin and Dagger 2
Kotlin
1
star
63

android-helloworld

just a sample project
Java
1
star
64

pod_player

Dart
1
star
65

json

JavaScript
1
star
66

jetpack-navigation-component-example

Example of jetpack navigation component with conditional login case
Kotlin
1
star
67

cesarferreira.github.io

HTML
1
star
68

release-notes

WIP - Tool to get release notes based on commit messages between commits
JavaScript
1
star
69

node-read-url

Reads an URL into a string
JavaScript
1
star
70

sample-data

JavaScript
1
star
71

flutterfy-cli

Flutter CLI tool to increase development speed
Ruby
1
star
72

swearjar

Static code analysis that looks for swear words in your codebase
Python
1
star
73

cm_to_nanoacres

Useless tool that converts cm2 into nanoacres
Rust
1
star