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/eventik/";
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"> Eventik </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.
inReview
column is set into True
.True
switch into False
.
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"> Eventik </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.com <string name="google_maps_key"> AIzaSi123fdre456rfgFd456tytr65hsfger5 </string>
Users.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 = "#f76830";
public static String GRAY = "#777777";
public static String BLACK_COLOR = "#252525";
public static Typeface osBold, osSemibold, osRegular, osExtraBold, osLight, osItalic, cunia;
These fonts are initialized into the onCreate()
function as follows:
cunia = Typeface.createFromAsset(getAssets(),"font/Cunia.ttf");
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 LatLng DEFAULT_LOCATION = new LatLng(40.7143528, -74.0059731);
public static double EVENTS_LOCATION_RANGE_KM = 100;
public static String[] popularCitiesArray = {
"New York_New York_40.7143528_-74.0059731",
"Los Angeles_California_34.0522342_-118.2436849",
"London_United Kingdom_51.5073509_-0.1277583",
"Rome_Italy_41.9027835_12.4963655",
"Miami_Florida_25.7616798_-80.1917902",
"Dubai_UAE_25.2048493_55.2707828",
"Paris_France_48.856614_2.3522219",
"Tokyo_Japan_35.6894875_139.6917064",
// ADD CITIES HERE (OR EDIT THE ONES ABOVE)
};
In case you want to add some city, follow the structure of the items in that array. As you can see, you compose an array item by typing the City name, its State and it’s GPS coordinates, all separated by the underscore _
symbol, NO spaces.
"Tokyo_Japan_35.6894875_139.6917064"
one, the application will show them in the Search City screen.
public static String[] eventsCategories = {
"Anything",
"Music",
"Food & Drink",
"Learn",
"Festival",
"Arts",
"Business",
"Cultural",
"Tour",
"Religion",
"Charity",
"Sports",
"Family",
"Comedy",
"Fashion",
"Seasonal",
"Science",
// ADDITIONAL CATEGORIES HERE...
};
You can edit those items or add new ones as you wish, they are just Strings.
public static String ADMIN_EMAIL = "admin@example.com";
// MARK: - TABLES & COLUMNS NAMES
DATABASE_PATH
into the DBase.java
file
bkgjobs.js
file for the Background jobbkgjobs.js
file that fires a background job that deletes passed events.dbase
folder in your server:.apk
file of your app in your Desktop
cd
command
keytool -printcert -jarfile YourApkName.apk
[Replace YourApkName with the name of your .apk file]
_config.php
file of the DBase API in your server and paste the Server Key you just copied in this variable, then save the file:
$FCM_SERVER_KEY = '[paste the Server Key here!]';
google-services.json
file and click Next
google-services.json
file in the app folder of the Android Studio project: fireInterstitialAd;
fireInterstitialAd(ctx);
NOTE: In order to comment a line of code, just add //
in the beginning:
// fireInterstitialAd(ctx);