Location based android marketplace for sellers and nearby customers
Here's a demo for the application: https://bit.ly/koleshopDemo
• Google Cloud Platform
- Google Cloud Sql (MySQL db)
- Google Cloud Storage (Used for storing images)
- Google App Engine (Java Backend)
- Google Cloud Endpoints v1 (Alternative of web services)
• Native Android App
- Clone the project
- Build using Android Studio (Sign in to the google account on Android Studio to enable the google cloud functionality like deploying the backend to app engine from inside the studio)
- Create a google cloud project.
- Create new google maps api key in the project and configure the key inside the build.gradle (app) inside the buildTypes section.
- Create a new google cloud sql instance in the project and use this database dump file to create the database.
- Now update the config-production.properties or the config-development.properties file. Update all the parameters related to Google Cloud Sql
- Enable Cloud messaging in your google project and Create a GCM key (now called FCM) to enable push notifications in the app. And update the GCM Api key inside the same config file as in previous step.
- Generate
google-services.json
for debug and release versions using button in step 2 on this page. Replace your debug & releasegoogle-services.json
files toapp/src/debug
andapp/src/release
respectively. Appropriate file is selected using build.gradle(app) - Create a new bucket in google cloud storage. Create a folder named
<your-bucket-name>/profile
,<your-bucket-name>/profile_thumb
,<your-bucket-name>/category-pics
and<your-bucket-name>/product_images/s
and update the pathcom.koleshop.koleshopbackend.common.Constants#PUBLIC_PROFILE_IMAGE_FOLDER
and other paths in the same section of this file. - Now upload the category pics from here to your google cloud storage directory & product images from here to
<your-bucket-name>/product_images/s
. Update the category-pics url in mysql db tableProductCategory
, columnimage_url
. Also update the product images url in TableInventoryVariety
and 'ProductVariety' - Uncomment the line
compile project(path: ':backend', configuration: 'android-endpoints')
in build.gradle(app) to compile the endpoints libs from the backend project. (Other way is to generate the jar libraries using gradlew export) Build>Deploy Module to app engine
inside Android Studio. This project uses Google Cloud Endpoints v1 and this step deploys the backend cloud endpoints to the app engine. Clicking on deploy will ask you to choose the google cloud project.- Build & Run the Android app on phone.
- Only activated shops are shown in the nearby shops list. You must go to the mysql db and activate any new shop manually.
- You must configure the SMS gateway in the backend
common.Constants.SMS_GATEWAY_URL
,common.Constants.USE_GATEWAY_NUMBER
and the sms sending json inservices.SessionService#requestOneTimePassword
according to your own sms gateway.