CustomerSupportDesk


Source link: https://github.com/dev-prajwal21/CustomerSupportDesk

CustomerSupportDesk

CustomerSupportDesk is a unique solution for adding Customer-Support module in any android app. The growth of any business purely depends on customer satisfaction, but the sustainance of growth in long term simply depends on the quality of support offered to help customers overcome the issues they face. Customer-Support, which is often neglected and taken for granted can sometime take a huge toll and make the users step out of the product in no time. The motive behind building this library is to address this common issue faced by all app developers so that they don't lose their users and keep increasing the userbase by offering a user-friendly and quality Customer-Support service.

The good thing about this library is that it is fully built on firebase! Yes, you don't need any backend infrastructure to use this library. Right from filling the user details to raising a complaint/suggestion/feedback and resolving those tickets by the admin, everything happens on firebase.

The library also provides the solution for monitoring and resolving the tickets raised by users by providing a built in admin section! So, you need not even think of building an admin panel to monitor and maintain the tickets raised by the users. It can be seen on the go and in real time.

And the best part is, all the above said features comes in just ten lines of code!

Usage

The library has two sections,

  1. Customer-Support section
  2. Admin section

Using the admin section is optional and is upto the choice of the developer. But its recommended to use, as it comes handy on the go.

Customer-Support Section

Step 1:

Create a project in firebase console.

Step 2:

Add the below code in the project level gradle under the dependencies{ } block,


classpath 'com.google.gms:google-services:3.1.0' 

Add the below code in module level gradle outside the dependencies{ } block,



apply plugin: 'com.google.gms.google-services' 

Add the below code in module level gradle inside defaultConfig{ } block,



multiDexEnabled true 

Add the below code in the project level gradle inside repositories block{ } ,



maven {
 url 'https://jitpack.io' 
}
 

Step 3:

Download the google.json file from the project created in firebase console and paste it in 'app' folder of your project

Step 4:

Add the below code in the module level gradle to include CustomerSupportDesk library,


compile 'com.github.dev-prajwal21:CustomerSupportDesk:1.0' 

Step 5:

Goto firebase console > Select the project you created > Select firebase database from menu.

Click on the rules tabs and replace the content with below code,

  {

  "rules": {

  ".read": "auth == null",
  ".write": "auth == null"

}
 
}
 

Now, Select the firebase storage from the menu.

Click on the rules tabs and replace the content with below code,

  service firebase.storage {

  match /b/{
bucket
}
/o {

 match /{
allPaths=**
}
 {

allow read, write: if request.auth == null;
  
}

}
  
}
 

Step 6:

Place a button anywhere in the app according to your design to navigate to customer-support screen.

Note:

Its not necessary that you need to use only button. It can be any view.

Step 7:

Get a reference to sharedPreferenceHelper object in the activity/fragment where the button (or any view) used to navigate to customer-support screen.

Implement the UserRegistrationListener in the activity/fragment where the button(or any view) used to navigate to customer-support screen as shown below,

  public class MainActivity extends AppCompatActivity implements UserRegistrationListener {

private SharedPreferenceHelper sharedPreferenceHelper;

@Override
  protected void onCreate(Bundle savedInstanceState) {

 super.onCreate(savedInstanceState);

 setContentView(R.layout.activity_main);

  sharedPreferenceHelper = new SharedPreferenceHelper(this, Config.SP_ROOT_NAME);

 
}

@Override
  public void registrationStatus(boolean isUserRegistered) {

 
}

  
}
 

Step 8:

Copy paste the below code in the interface method registrationStatus(),

 if (isUserRegistered) {

if (sharedPreferenceHelper.getBoolean(Config.SP_ADMIN_LOGIN, false)) {

 sharedPreferenceHelper.putBoolean(Config.SP_ADMIN_LOGIN, false);

}

startActivity(new Intent(this, CustomerDashboard.class));

  
}
 else {

startActivity(new Intent(this, ProfileFillUpActivity.class));

  
}
 

Step 9:

Get a reference for the button (or any view) used to navigate to customer-support screen and attach a click listener to it.
  contactSupportBtn = (Button) findViewById(R.id.contactSupportBtn);

contactSupportBtn.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View v) {

}

  
}
);
 

Copy paste the below code inside the listener,

  UserRegistration userRegistration = new UserRegistration(MainActivity.this);

userRegistration.setUserRegistrationListener(MainActivity.this);

userRegistration.isUserRegistered("12345");
 

Replace "12345" by a uniqueID with which you identify your user. The ID should be unique for each user.

Thats it!! Now your app has a customer-support module integrated to it.
Click on the button and fill the user details to proceed to the dashboard and add complaints, suggestions, feedback.

Each time a complaint/suggestion/feedback is added, you can view the data in the firebase console.

Admin Section

To add admin facility to monitor and resolve the tickets raised, you can use the same login system your app uses and navigate to admin section.

Authentication of admin can be done via webservice or you can even simply hardcode the admin credentials within the app so that if the admin credentials are given it is navigated to admin dashboard.

As an example here I'm using a button to simply go to admin section. Modify this according to your need in the login screen so that a web-service or hardcoded values of admin credentials can be used to navigate to admin dashboard.

  adminBtn = (Button) findViewById(R.id.adminBtn);

adminBtn.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View v) {

 sharedPreferenceHelper.putBoolean(Config.SP_ADMIN_LOGIN, true);

 startActivity(new Intent(MainActivity.this, AdminDashboard.class));

}

  
}
);
 

Note:

While logging in as admin it is mandatory to use the below line of code and then start the AdminDashboard activity,
  sharedPreferenceHelper.putBoolean(Config.SP_ADMIN_LOGIN, true);
 

Screenshots

Customer-Support Section:




Admin Section:


Note:
Please take a look at the sample app for more clarity on implementation.

Feel free to experiment on the project. Star the project if you liked my work and if it helped you.

Happy Coding :)

Thanks

ArthurHub Cropper

License

Apache License v2.0

Resources

Makes your data classes Parcelable. Just add AutoParceable to the class declaration. That's all. No methods need to be implemented.

Rosie is an Android framework to create applications following the Clean Architecture.

Rosie divides your application in three layers, view, domain and repository. For each layer, Rosie provides plenty of classes that will make defining and separating these concerns much easier.

This is an Android library allowing to add Header and/or Footer in your RecyclerView in the simplest way possible.

Implementation of Android Marshmallow Boot Animation.

Simple library that helps developers to create awesome sliding android app tutorial.

This is a Gradle plugin, for Android developers, that automates app versioning.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes