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 = "https://xsgames.co/__apps/elephant/";
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"> Elephant </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:
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"> Elephant </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 = "#61c9b0";
public static String GRAY = "#bababa";
public static String RED = "#f46467";
public static String BLACK = "#252525";
res/values/colors.xml
file:
<color name="main_color">#61c9b0</color>
<color name="light_grey">#FFF8F8F8</color>
<color name="semidark">#6e000000</color>
<color name="audio">#61c9b0</color>
<color name="drawing">#f5c926</color>
<color name="image">#f46467</color>
<color name="list">#feb633</color>
<color name="text">#4094ea</color>
<color name="video">#855ae6</color>
public static Typeface popBlack, popBlackItalic, popBold, popBoldItalic,
popExtraBold, popExtraBoldItalic, popExtraLight, popExtraLightItalic, popItalic,
popLight, popLightItalic, popMedium, popMediumItalic, popRegular, popSemibold, popSemiboldItalic,
popThin, popThinItalic;
These fonts are initialized into the onCreate()
function as follows:
popBlack = Typeface.createFromAsset(getAssets(),"font/Poppins-Black.ttf");
popBlackItalic = Typeface.createFromAsset(getAssets(),"font/Poppins-BlackItalic.ttf");
popBold = Typeface.createFromAsset(getAssets(),"font/Poppins-Bold.ttf");
popBoldItalic = Typeface.createFromAsset(getAssets(),"font/Poppins-BoldItalic.ttf");
popExtraBold = Typeface.createFromAsset(getAssets(),"font/Poppins-ExtraBold.ttf");
popExtraBoldItalic = Typeface.createFromAsset(getAssets(),"font/Poppins-ExtraBoldItalic.ttf");
popExtraLight = Typeface.createFromAsset(getAssets(),"font/Poppins-ExtraLight.ttf");
popExtraLightItalic = Typeface.createFromAsset(getAssets(),"font/Poppins-ExtraLightItalic.ttf");
popItalic = Typeface.createFromAsset(getAssets(),"font/Poppins-Italic.ttf");
popLight = Typeface.createFromAsset(getAssets(),"font/Poppins-Light.ttf");
popLightItalic = Typeface.createFromAsset(getAssets(),"font/Poppins-LightItalic.ttf");
popMedium = Typeface.createFromAsset(getAssets(),"font/Poppins-Medium.ttf");
popMediumItalic = Typeface.createFromAsset(getAssets(),"font/Poppins-MediumItalic.ttf");
popRegular = Typeface.createFromAsset(getAssets(),"font/Poppins-Regular.ttf");
popSemibold = Typeface.createFromAsset(getAssets(),"font/Poppins-SemiBold.ttf");
popSemiboldItalic = Typeface.createFromAsset(getAssets(),"font/Poppins-SemiBoldItalic.ttf");
popThin = Typeface.createFromAsset(getAssets(),"font/Poppins-Thin.ttf");
popThinItalic = Typeface.createFromAsset(getAssets(),"font/Poppins-ThinItalic.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 int MAX_AUDIO_RECORDING_TIME = 60;
Please note that the higher the value, the higher the uploading time while saving a note.
public static int MAX_VIDEO_RECORDING_TIME = 20;
Please note that the higher the value, the higher the uploading time while saving a note.
public static float[] brusheSizes = {
4f, 6f, 10f, 12f, 14f, 16f, 18f, 20f,
// YOU CAN ADD MORE BRUSH SIZES HERE...
};
public static String[] brushColors = {
"#252525",
"#e1e1e1",
"#8344af",
"#ed5564",
"#fc6d52",
"#d870ad",
"#8cc051",
"#5d9bec",
"#48cfae",
"#39bf68",
// YOU CAN ADD MORE CUSTOM COLORS HERE...
};
// MARK: - TABLES & COLUMNS NAMES
DATABASE_PATH
into the DBase.java
file
DBase.php
file with your favorite HTML/text editor and do the following steps:
$DATABASE_PATH = 'http://yourdomain/dbasefolder/';
$APP_NAME
string:
$APP_NAME = "Elephant";
$APP_STORE_LINK
and $PLAY_STORE_LINK
strings into the URLs of your mobile versions of this app on the App Stores:
$APP_STORE_LINK = 'https://apps.apple.com/app/id1575339022';
$PLAY_STORE_LINK = 'https://play.google.com/store/apps/details?id=com.xscoder.mysteryboxevo';
fireInterstitialAd;
fireInterstitialAd(ctx);
NOTE: In order to comment a line of code, just add //
in the beginning:
// fireInterstitialAd(ctx);