Android Starter is a module that we use internally in our projects. It takes care of all basic setup and scaffolding needed, as per best practices that we have come across thus far. Simply integrate it into your project and get started!
- Build Helper
- Retrofit Builder
- API Handler
- Base URL Helper
- JSON Helper
- End-Point Config
- Pagination Helper
- Logger
- Session Handler
- Screen Density Conversion Helper
- Date Helper
- HTML Helper
- String Helper
- Network Connectivity Helper
- ID Generator
- Dimension Config.
- Widget Style Config.
- Misc. Config.
- App Compat
- Card View
- Recycler View
- Facebook SDK
- Google Auth SDK
- Custom Font Config.
- ORM
- Open your Android Studio project.
- Select Project Structure from the File menu on Android.
- Click on the + icon present at the top left corner and select Import Gradle Project before clicking Next.
- After clicking Next button a new screen appears and asks you to specify the Source directory of your module.
- Set the Source directory path of your Gradle project module and change the Module name if required after checking the import checkbox.
- Click Finish button to proceed and add the Gradle project module and then click OK to see if the module is added in the Project Explorer.
- Repeat Step 2.
- Select your project app folder and then select the Dependencies tab.
- Now, click on the + icon at the bottom of the Dependencies tab and select Module Dependency.
- A new screen appears to select the module that you have added to your project.
- Select the Gradle project module from the list of available module and click on OK button at the bottom right corner.
- Now, click on the OK button again present at the bottom right corner and now you are done integrating the module as a dependency.
- Build Helper Helper class to initialize the SDK and apply few basic settings like: Enable/Disable debug mode and setting build type to Poduction/Staging.
Utitlity/Helper Class AppHelper.java
- Retrofit Builder Instance which uses the interface and the Builder API which allows defining the URL end point for the HTTP operation.
Utitlity/Helper Class AppClient.java
Libraries com.squareup.retrofit2:retrofit:2.2.0 com.squareup.retrofit2:converter-gson:2.2.0 com.squareup.okhttp3:okhttp-urlconnection:3.6.0 com.squareup.okhttp3:logging-interceptor:3.6.0
- API Handler Interfaces which defines the possible HTTP operations. Every method of an interface represents one possible API call. It must have a HTTP annotation (GET, POST, etc.) to specify the request type and the relative URL. The return value wraps the response in a Call object with the type of the expected result.
Utitlity/Helper Class API.java
Libraries com.squareup.retrofit2:retrofit:2.2.0 com.squareup.retrofit2:converter-gson:2.2.0 com.squareup.okhttp3:okhttp-urlconnection:3.6.0 com.squareup.okhttp3:logging-interceptor:3.6.0
- Base URL Helper Base Url Helper class to get the base url that is set.
Utitlity/Helper Class BaseUrlHelper.java
- JSON Helper Utility class to do JSON related conversions.
Utitlity/Helper Class GsonHelper.java
Libraries com.squareup.retrofit2:converter-gson:2.2.0
- End-Point Config Helper class that holds constants for API endpoints to be used.
Utitlity/Helper Class EndPoint.java
- Pagination Helper Custom implementation of RecyclerView.OnScrollListener to handle "loadmore" (Pagination) in RecyclerView.
Utitlity/Helper Class EndlessRecyclerOnScrollListener.java
Libraries androidx.recyclerview:recyclerview:1.1.0
- Logger Utility class to be used as an alternative to Log in Android.
Utitlity/Helper Class Logger.java
-
Session Handler Utility class to handle access token related session.public void
setAccessToken(String iAccessToken) public String getAccessToken() public void clearSession()
Utitlity/Helper Class AppSession.java
-
Screen Density Conversion Helper Utility class to do some minimal conversion related to android screen density.
public static float dpToPx(Context iContext, float dp) public static float pxToDp(Context iContext, float px) public static int getScreenWidth() public static int getScreenHeight()
Utitlity/Helper Class ConversionHelper.java
- Date Helper Utility class to do date conversions based on your requirement like parsing date string to display date in different date formats.
Utitlity/Helper Class DateUtil.java
- HTML Helper Helper class to escape HTML strings.
Utitlity/Helper Class HTMLEscape.java
- String Helper Utility class to that provides few string related operations.
Utitlity/Helper Class StringUtils.java
- Network Connectivity Helper Helper class to check if the device is connected to internet (WiFi or Data connection).
Utitlity/Helper Class NetworkUtils.java
- ID Generator Utility class to generate unique integer IDs.
Utitlity/Helper Class NotificationId.java
- Dimension Config. Contains pre-defined margins and text sizes to be used within the app.
Utitlity/Helper Class dimens.xml
- Widget Style Config. Contains basic styling for TextView and Edittext to be used withing the app.
Utitlity/Helper Class widget_styles.xml
- Misc. Config. Utility class to configure Base Url for Production & Staging amongst other misc. configurations.
Utitlity/Helper Class Config.java
- App Compat This library adds support for the Action Bar user interface design pattern. This library includes support for material design user interface implementations.
Libraries androidx.appcompat:appcompat:1.2.0
- Card View This library adds support for the CardView widget, which lets you show information inside cards that have a consistent look on any app. These cards are useful for material design implementations, and are used extensively in layouts for TV apps.
Libraries androidx.cardview:cardview:1.0.0
- Recycler View The "recyclerview" library adds the RecyclerView class. This class provides support for the RecyclerView widget, a view for efficiently displaying large data sets by providing a limited window of data items.
Libraries androidx.recyclerview:recyclerview:1.1.0
- Facebook SDK Library that helps to integrate Facebook login.
Libraries com.facebook.android:facebook-android-sdk:4.4.0
- Google Auth. SDK Library that helps to integrate Google login.
Libraries com.google.android.gms:play-services-auth:10.2.6
- Custom Font Config. Library to apply custom fonts to your app.
Libraries uk.co.chrisjenx:calligraphy:2.2.0
- ORM Helper Object Relational Mapping Lite (ORM Lite) provides some simple, lightweight functionality for persisting Java objects to SQL databases while avoiding the complexity and overhead of more standard ORM packages.
Libraries com.j256.ormlite:ormlite-android:5.0 com.j256.ormlite:ormlite-core:5.0
This module has been developed in house here at WowLabz by Ritesh Dubey and Saurabh Kataria from the Android team.
For feedback and suggestions on this project, you can reach out to:
For all other communication, write to us at: