AndroidEssentials is an android library that creates helper functions for performing common tasks in Android

Overview

AndroidEssentials

AndroidEssentials is an android library that creates helper functions for performing common tasks in Android such as managing preferences, managing files, showing alerts, showing toasts, checking user country & checking network connection of users. All the methods of the class are static and should be accessed directly from the AndroidEssentials class.

Language

Kotlin

Installation

Gradle

  1. Add it in your root build.gradle at the end of repositories:
allprojects {
 	repositories {
 		...
 		maven { url 'https://jitpack.io' }
 	}
 }

NB As of gradle 7.x.x allprojects has been depreciated in favor of Dependency Resolution Management. Go to settings.gradle and add the jitpack.io repository

dependencyResolutionManagement {
  repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
  repositories {
      google()
      mavenCentral()
     
      // e.g this is how you would add jitpack
      maven { url "https://jitpack.io" }
      
  }
}
  1. Add the dependency
dependencies {
         implementation 'com.github.IsaacSichangi:AndroidEssentials:v1.0.1'
 }

Maven

  1. Add the JitPack repository to your build file

 	
 	    jitpack.io
 	    https://jitpack.io
 	
 
  1. Add the dependency

      com.github.IsaacSichangi
      AndroidEssentials
      v1.0.1
  

Preferences

AndroidEssentials.storeValueString(context: Context, key: String?, value: String?, app_name: String)

AndroidEssentials.storeValueDouble(context: Context, key: String?, value: Double, app_name: String)

AndroidEssentials.storeValueInt(context: Context, key: String?, value: Int, app_name: String)

AndroidEssentials.storeValueLong(context: Context, key: String?, value: Long, app_name: String)

AndroidEssentials.storeValueBoolean(context: Context, key: String?, value: Boolean, app_name: String)

AndroidEssentials.getValueBoolean(context: Context, key: String?, app_name: String):Boolean

AndroidEssentials.getValueInt(context: Context, key: String?, app_name: String):Int

AndroidEssentials.getValueDouble(context: Context, key: String?, app_name: String):Double

AndroidEssentials.getValueLong(context: Context, key: String?, app_name: String):Long

AndroidEssentials.getValueString(context: Context, key: String?, app_name: String):String

AndroidEssentials.clearValues(context: Context, app_name: String)

AndroidEssentials.deleteValue(context: Context, key: String?, app_name: String) 
      

File Management

AndroidEssentials.checkFileExistence(context: Context, filename: String):Boolean
       
AndroidEssentials.storeFile(title: String, contents: String?, context: Context):Boolean
       
AndroidEssentials.getFileContents(filename: String, context: Context):String

AndroidEssentials.deleteFile(title: String, context: Context)

Get User Country Code

AndroidEssentials.getUserCountry(context: Context):String

Check Network Connection

AndroidEssentials.checkConnection(context: Context): Boolean 

Show Alert & Toast

AndroidEssentials.showToast(context: Context?, message: String?)
  
AndroidEssentials.showAlert(activity: AppCompatActivity, message: String?)
You might also like...
Proguard configurations for common Android libraries

android-proguard-snippets Example Proguard configurations for common Android libraries. This project assumes that your ProGuard configuration is based

BuildConfiguration information for use in multi-module, or Kotlin Multiplatform common code

component-build-configuration A small library supporting Kotlin Multiplatform for utilizing BuildConfiguration details from common code and across mod

Design patterns are typical solutions to common problems in software design

Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code.

ArchGuard is a architecture governance tool which can analysis architecture in container, component, code level, create architecure fitness functions, and anaysis system dependencies..
ArchGuard is a architecture governance tool which can analysis architecture in container, component, code level, create architecure fitness functions, and anaysis system dependencies..

ArchGuard backend ArchGuard is a architecture governance tool which can analysis architecture in container, component, code level, database, create ar

ADX provides extension functions and lint.

ADX: Android development extensions Overview ADX provides extension functions and lint. Installation ADX implementation "com.github.wada811.adx:adx:$v

Show worldwide headline. API/Glide library/recycler view/volley library/kotlin/xml/ chrome custom tabs
Show worldwide headline. API/Glide library/recycler view/volley library/kotlin/xml/ chrome custom tabs

Show worldwide headline. API/Glide library/recycler view/volley library/kotlin/xml/ chrome custom tabs. - you can click on headline and it will open an article of that news in the app(no need to go to chrome or any browser)

 A music picker library for React Native. Provides access to the system's UI for selecting songs from the phone's music library.
A music picker library for React Native. Provides access to the system's UI for selecting songs from the phone's music library.

Expo Music Picker A music picker library for React Native. Provides access to the system's UI for selecting songs from the phone's music library. Supp

:movie_camera: Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.
:movie_camera: Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.

Popular Movies Stage 1 + Stage 2 Discover the most popular and top rated movies playing. Movies data fetched using themoviedb.org API. ✨ Screenshots M

Oratio Library for Android Studio helps you simplify your Android TTS codes

Oratio Oratio is a library for Android Studio. This library is useful to a number of developers who are currently making apps using android TTS(Text-T

Releases(v1.0.1)
  • v1.0.1(Apr 13, 2022)

    AndroidEssentials is an android library that creates helper functions for performing common tasks in Android

    • such as managing preferences, managing files, showing alerts, showing toasts, checking user country & checking network connection of users
    Source code(tar.gz)
    Source code(zip)
Owner
Isaac Sichangi
Full stack software developer focused on web and mobile development
Isaac Sichangi
GOD - Goal of the day is the notes app which tracks your daily tasks, most important tasks & monthly goals

GOD - Goal of the day GOD - Goals of the day Problem Statement: People always face problems in finding their goals and keeping track over a period. Th

Shubham Jitiya 1 Jan 16, 2022
Helper tool for calculating scales for Teenage Engineering Pocket Operator PO-33/133 & PO-35/137 series.

I heard you like Pocket Operators, so I made Pocket Scale Calculator for your Pocket Operator. This console app is a helper tool for calculating scale

null 9 Dec 6, 2022
LuaBox Helper for call lua scripts on Kotlin

LuaBox Helper for call lua scripts on Kotlin! Big thanks to Luaj library! 1. Create a class for working with LuaBox: class ScriptCore: LuaBox( pat

Мяучер 8 Nov 12, 2022
Warscape core library. Includes common models for sharing between platforms.

warscope-core This repository uses for sharing common models between backend and frontend sides. Implementation $version available at top of README.md

Warscape 5 Oct 8, 2021
The Android startup used to schedule tasks, jobs while launching Android App.

Android Startup, schedule your startup jobs Introduction AndroidStartup is an open source project used to refine your Andriod App startup. Compared wi

ShouHeng 46 Aug 24, 2022
Taskify - An app to manage your daily tasks and boost your productivity. Taskify is built using kotlin and follows all modern android Development practices and hence is a good learning resource for beginners

Taskify Taskify is an app to manage your daily tasks and boost your productivity Video Introduction ?? This is a small introduction video about Taskif

Vaibhav Jaiswal 101 Jan 4, 2023
The tasks provided in the perspective of Google's android training project

Dogglers - Starter Code Starter code for the second independent project for Android Basics in Kotlin. Introduction This is the starter code for the Do

Alperen Ekin 0 Dec 15, 2021
Techbee e.U. 62 Jan 31, 2023
ToDo App is a kind of app that generally used to maintain our day-to-day tasks or list everything that we have to do

ToDo App is a kind of app that generally used to maintain our day-to-day tasks or list everything that we have to do, with the most important tasks at the top of the list, and the least important tasks at the bottom. It is helpful in planning our daily schedules.

Hamza Gamal 9 Oct 16, 2022
Android common lib demo, include ImageCache, HttpCache, DropDownListView, DownloadManager, install apk silent and so on, you can find description

android-demo 关于我,欢迎关注 微博:Trinea 主页:trinea.cn 邮箱:trinea.cn#gmail.com 微信:codek2 依赖:trinea-android-common android-auto-scroll-view-pager viewpager-indica

Trinea 1.1k Dec 30, 2022