Please carefully read this guide in order to fully configure this template, and remember to test it on a Real Device – the Emulator may fail.
An internet connection is required.
IMPORTANT: The backend of this template is the DBase API.
https://mydomain.com/dbasefiles
- and replace the string of the DATABASE_PATH
variable in the DBase.java
file with your URL:
public static String DATABASE_PATH = "http://3.67.163.164/__apps/bCards/";
Users.json
and Posts.json
files
This template has native Android Java/XML code so you can edit it only with Android Studio. If you don’t have it, download it for free.
Download Android Studiostring.xml
file – it’s into the res/values
folder in Android Studio – and replace the App Name of this line with your new one:
<string> string name="app_name"> bCards </string>
com
folder as it is and rename the other ones.build.gradle
(the Module app one) in Android Studio and rename the applicationId
into your new package name, then click Sync Now on the top-right corner.
.xml
files stored into the res/layout
folder. Those files are the ones where you can edit all Views, Buttons texts, TextView’s strings, and all Views attributes – position, font color, size, etc.
.java
files.
drawable
folders, where the app icons are stored into the mipmap
folders.
tou.html
file form the left-side panel’s list in Android Studio and edit it accordingly to your own Terms of Service and Privacy Policy. Also, replace the APP_NAME
words with the new name you assigned to your App.
"mailto:support@yourdomain.com">support@yourdomain.com
tou.html
file, so you must replace support@yourdomain.com with a valid email address where people can contact you for any question, feedback or in case they want to delete their account.
ID_id value
, select that row and click the Delete Row(s) button.ID_id
value you’ve previously noted in all the other Tables of your database, check out all the rows until you’ll find that ID_id
and delete it – this happens in case it appears into some Array type columns.
ID_id
in your database:
AR_reportedBy
in the Users table, and take action for it asap. Check out if they contain some ID_id
of Users (which means those users have reported the data of that row).
ID_id
and search for it in the other Tables, and remove such ID if you’ll find it in some cell.
res/values
folder in Android Studio. Open this file and keep reading this guide, you’ll have to perform some edits in this file in order to get your template ready to run.
<string> string name="app_name"> bCards </string>
<string>name="ADMOB_INTERSTITIAL_UNIT_ID">ca-app-pub-3940256099942544/1033173712
<string>name="ADMOB_APP_ID">ca-app-pub-3940256099942544~3347511713
You have to create your Unit ID at apps.admob.comUsers.json
and Posts.json
files
#
symbol. The main color of the app and some UI will be affected by your change:
public static String MAIN_COLOR = "#48cfae";
public static String LIGHT_GREY = "#FFF8F8F8";
public static String BLACK_COLOR = "#252525";
public static String GRAY = "#777777";
public static Typeface osBold, osSemibold, osRegular, osExtraBold, osLight, osItalic;
These fonts are initialized into the onCreate()
function as follows:
osBold = Typeface.createFromAsset(getAssets(),"font/OpenSans-Bold.ttf");
osSemibold = Typeface.createFromAsset(getAssets(),"font/OpenSans-Semibold.ttf");
osRegular = Typeface.createFromAsset(getAssets(),"font/OpenSans-Regular.ttf");
osExtraBold = Typeface.createFromAsset(getAssets(),"font/OpenSans-ExtraBold.ttf");
osLight = Typeface.createFromAsset(getAssets(),"font/OpenSans-Light.ttf");
osItalic = Typeface.createFromAsset(getAssets(),"font/OpenSans-Italic.ttf");
In case you want to add a new font, you have to first drag your .ttf
or .otf
font file into the app/src/main/assets/font
folder.public static Typeface
line that’s into the onCreate()
function – let’s pretend you have a font file called Helvetica-Bold.ttf, you may add an instance called hBold
(it’s just an example, name it as you wish since it’s a variable):
public static Typeface popBold, popSemibold, ... hBold;
Lastly, import its path into the onCreate()
function like the existing ones. Based on the font example above, your new line of code may look like this:
hBold = Typeface.createFromAsset(getAssets(),"font/helvetica-Bold.ttf");
public static String ADMIN_EMAIL = "admin@email.com";
public static int DISTANCE_FROM_YOUR_LOCATION = 10
public static String[] categoriesList = {
"Cleaning", // cat0
"Insurance", // cat1
"Finance", // cat2
"Real Estate", // cat3
"Events - Catering", // cat4
"Legal", // cat5
"Creative", // cat6
"Writing - Translating",// cat7
"Repairing Skills", // cat8
"Moving - Storage", // cat9
"Domestic Help", // cat10
"Beauty - Health", // cat11
"Computer Skills", // cat12
"Babisitter - Nanny", // cat13
// YOU CAN EDIT OR ADD CATEGORIES AS YOU WISH, JUST MAKE SURE TO ASSIGN THE PROPER IMAGES TO THE CATEGORIES
};
You can edit the names of the list as you wish, or add new ones. In case you’ll add new Categories, you’ll also have to add their images in the drawable
folder in Android Studio – you can find it into the res
folder.
"Babisitter - Nanny", // cat13
item:
"Artistic stuff", // cat14
The // cat14
comment is just to remind you that your image name must be cat14.jpg, so create a new .jpg image, name it cat14.jpg and drag it into the drawable
folder – check the existing images to get the size of them. // MARK: - TABLES & COLUMNS NAMES
DATABASE_PATH
into the DBase.java
file
.apk
file of your app in your Desktop
cd
command
keytool -printcert -jarfile YourApkName.apk
[Replace YourApkName with the name of your .apk file]
fireInterstitialAd;
fireInterstitialAd(ctx);
NOTE: In order to comment a line of code, just add //
in the beginning:
// fireInterstitialAd(ctx);