User Guide

Powered by Panacea-Soft

PS-BuySell is Android Full Application solution with Backend Management System.

Thank you for purchasing my full application. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Response time is within 36 hrs.Thanks so much!.



Author: Panacea-Soft
Contact: teamps.is.cool@gmail.com
Current App Version: 1.7
Documentation Version 1.7
Created: 22/Jul/2019
Modified: 6/Sep/2019

PS-BuySell! You could build the niche app for PS-BuySell sharing among the people. You could able to upload all those wallpaper from backend CMS.

Used Technology : Google Architecture Component, AndroidX, Native Android Development, Java JDK, Android SDK, Android Studio, Google Map, Firebase Cloud Messaging, CodeIgniter, Bootstrap, RESTFUL

Important Note : After you downloaded main file successfully from CodeCanyon, here is you may need to know :
1. Setup SDK & Studio
2. Import Project
3. Sync Gradle Libraries
4. Project Package Structure
5. Config File For RestAPI
6. App Icon, String Value Config, Material Design Color Theme

7. Generate FCM Key and Google Admob Keys

8. Backend Configuration and Import Sample Database
9. Login To Backend
10. Backend Data Management

11. Data Analytics, Export Database
12. Sending Push Notification
13. Firebase Chat Configuration

Working Environment

You need to setup your working environment for Android Development.

Need to install Java JDK from here

Need to install Android Studio as official IDE for Android Development.

You can install necessary SDK packages from Android Studio Menu -> Tools -> Android -> SDK Manager
According the app's targetSdkVersion from gradle file, you might need to install Android 9.0 (API 28)

If directly development and testing on real device is the best option but if you want to install android emulator, please install Genymotion (Note : Google Play Service is required to install for Google Map and GCM feature.)


Import Project

You have to import the project into your android studio and copy into your workspace folder.

After you download from Codecanyon, there is the project source code at "Mobile Source\PS-BuySell".

You could import from Android Studio Menu ( File -> New -> Import Project ). When popup window come out, please go to the folder(Mentioned at step 1). Yes, please copy that project into your work space.

You have to make sure for SDK and JDK path for your imported project. Right Click project -> Open Module Settings. At popup window you could check whether correct path or not.


Dependencies Libraries

Dependencies Libraries are some additional libraries for the project. Normally, it declares at gradle file then Android Studio will sync for those libs into your local working environment.

There is file so called build.gradle at "PS-BuySell\build.gradle".

When Android Studio ask whether want to sync for those dependencies, please click to "sync" and wait until it finished successfully. Please make sure one thing to uncheck for "Offline work", if not it will sync and download from internet. (Android Studio -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle )


Java Files Package

There is some package inside project to maintain easily in future.

Package Name Description
com.panaceasoft.psbuyandsell.api Api modules are responsible for authenticating and interacting with APIs and sending network requests with Retrofit.
com.panaceasoft.psbuyandsell.binding Binding modules are responsible for custom binding adapter functions
com.panaceasoft.psbuyandsell.db DB modules are responsible for Room Dao implementation with SQLite database.
com.panaceasoft.psbuyandsell.di Di modules are responsible for dependencies injection.
com.panaceasoft.psbuyandsell.repository Repository modules are responsible for handling data operations.
com.panaceasoft.psbuyandsell.ui Ui modules are responsible for all user interface.
com.panaceasoft.psbuyandsell.utils Utils modules are responsible for handling utilities functions.
com.panaceasoft.psbuyandsell.viewmodel Viewmodels modules are responsible for handling data and logic of ui.
com.panaceasoft.psbuyandsell.viewobject viewobjects modules are responsible for holds user data, use as entity for Room and use as serialize for Retrofit API Call.

Rename Package

Currently, my original package name is "com.panaceasoft.psallpaper" so after you bought, you might need to change according your own package name. For example, if you want to change com.example.app to my.awesome.game. (Note : My example is using Android Studio)

In your Project pane, click on the little gear icon

Uncheck / De-select the Compact Empty Middle Packages option

Your package directory will now be broken up in individual directories.

- Right-click it
- Select Refactor
- Click on Rename
- In the Pop-up dialog, click on Rename Package instead of Rename Directory
- Enter the new name and hit Refactor
- Allow a minute to let Android Studio update all changes
- Note: When renaming com in Android Studio, it might give a warning. In such case, select Rename All

Now open your Gradle Build File (build.gradle - Usually app or mobile). Update the applicationId to your new Package Name and Sync Gradle, if it hasn't already been updated automatically:


You could generate new app icon from Android Assets Studio. After that you could replace new ic_launcher.png at mipmap-mdpi, mipmap-hdpi, mipmap-xhdpi, mipmap-xxhdpi, mipmap-xxxhdpi. If you want to know about screen densities and icon dimensions, please take a look at below


Material Design Color

Color in material design is inspired by bold hues juxtaposed with muted environments, deep shadows, and bright highlights. (Read More)

File Name Description
/src/main/res/values/colors.xml You could replace the another material design colors at that colors.xml. If you don't know match colors combination, Material Palette would help you to pick the color easily. After you got the color from there, you just replace at colors.xml

String Value Config

All label and text from application are coming from string config file.

File Name Description
/src/main/res/values/strings.xml You could replace new label and text at strings.xml file including app name also at"app_name"

API Link

You have to change your API link according your domain name.

File Name Description
src/main/java/com/panaceasoft
/psbuyandsell/Config.java
You might need to replace your API link at this Config file according your domain and working environment.
public static final String APP_API_URL = "http://www.yourdomain.com/ps-buysell-admin/index.php";
public static final String APP_IMAGES_URL = "http://www.yourdomain.com/ps-buysell-admin/uploads/";

Firebase Cloud Messaging

Send data from your server to your users' devices, and receive messages from devices on the same connection. The FCM service handles all aspects of queueing of messages and delivery to client applications running on target devices, and it is completely free.

You might need to login into Firebase Console using with your gmail account.

After login into Firebase Console, please crate new project



Please choose "Add Firebase to your Android App".

3.1 Enter App Detail


3.2 Copy Config File


3.3 Add To Gradle

(Note : It is already done so you no need to add at gradle file.)

4.1 Assume that you are now already inside at ( https://console.firebase.google.com ) Please go to "Project Setting"


4.2 You can see the Setting tabs


4.3 Please copy API Key from Cloud Messaging Tab
Please go to "Cloud Messaging" tab. If you see "Server key (legacy token)", you need to use that key.


You need to put that key at config\config.php from backend.
$config['fcm_api_key'] = "------- your key -------";


Admob

Earn more from your mobile apps using Google AdMob. Use in-app advertising to generate revenue, improve user experience, and scale your business.


Firebase Chat

Implement a user-friendly chat feature, so that your users can chat with each other.

You might need to login into Firebase using with your gmail account.

Go to Authorization


Click Edit and Enable Email/Password.


After that you will see like this ( it showing Enabled )


Click Create Database


And Click Next


And Click Done.


Go to Database/Rules ( Make Sure you are selected Realtime Database ) and Click Publish


    {
      /* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */
      "rules": {
        ".read": true,
        ".write": true,

          "timestamp" : {
            ".indexOn" : ".value"
          }
        }
      
    }
 


Configuration

You have to change some configuration at CodeIgniter.

File Name Description
config.php You have to change email config for for sending email like forgot password, the system will use the following email address.(Path : application/config/config.php)

$config['sender_email'] = your hosting email address;
$config['sender_name'] = sender name;
$config['fcm_api_key'] = "AIzaSyBJ_IiWAXsCoTHweS63lhIfxf1Ec0c9mnUEDC";


database.php You have to change database configuration according your environment.(Path : application/config/database.php)

$db['default']['hostname'] = database host name;
$db['default']['username'] = database username;
$db['default']['password'] = database password;
$db['default']['database'] = database name;

Import Database

You have to import sample data into your MySQL database.

Please go to your MySQL DB and create new database so called "ps-buysell"

Go to "Import Tab". Then please click "Browse" button to select sample data sql script.

You may need to select "sample_data.sql" from "Sample Data" fodler. Finally you click to "Go" button to import data into your database.


Login Credential

After you upload backend source folder(ps-buysell-admin) from "Backend(Source and Sample Data)" Please type : http://yourdomain.com/ps-buysell-admin/

User Role Description
Admin User You can login with admin user into system.

username : admin@ps.com
password : admin

After login successfully to Backend, you may see Dashboard Menu at left side.
Entry
- Categories
- Subcategories
- Items
- Item Currency
- Item Price
- Item Type
- Item Location
- Blog

Reports
- Most Popular Items
- Most Rating Users
- Contact Us Message

- Item Reports

Reports
- Transactions
- Most Popular Items
- Most Popular Items
- Most Rated Items

Users Management
- Registered Users

Miscellaneous
- Export Database
- Push Notification

Setting
- App Setting
- About & Setting
- API Keys
- Version


Example

I would like to show you one of example for Item CRUD.

When you click "Categories" from menu, you will see Category Listview. You can easily search and filter from on that page. Moreover, you can do publish/unpublish, edit and delete item also.

If you want to add new item, please click "+ Add New Item" button. Then the page will redirect to entry form.



API Key

It is security purpose in between your app and backend.

Please open Config.java then repalce according your generated key from backend.



Analytics

You can send the push notification messages from backend to all your registered devices.

You would see the notification list. If you want to send the new notification message, click "+ Push Message"