The strings.xml
file
You can find this file into the
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:
App Name
Replace the following name with the new one you want to give to this app in this line:
<string> string name="app_name"> Eventik </string>
AdMob Unit ID & App ID
Replace the values of these variables with your own
Interstitial Unit ID and
App ID strings.
name="ADMOB_INTERSTITIAL_UNIT_ID"> ca-app-pub-3940256099942544/1033173712< /string>
name="ADMOB_APP_ID">ca-app-pub-3940256099942544~3347511713< /string>
You have to create your
Unit ID at
apps.admob.com.
Follow the instructions on the AdMob's website in case you don't know how to generate an AdMob Unit ID.
Google Maps API Key
You must replace the
Google Maps API Key with your own one in the variable below - you can generate your Maps Key on this
LINK after setting up a Google Billing account (required since middle 2018):
<string name="google_maps_key"> AIzaSyDqoFdzU1hZ5AhyOwqAAjy0GVTcgBDfTFk</string>
The Configurations.java
file
Open this file from Android Studio and keep reading this guide, you'll have to perform some edits in this file in order to get your template ready to run:
Parse Server Keys
As explained in the
Quick Start section of this guide, you must replace the strings of the 2 variables below with your own
App Id and
Client Key that you will get from the back4app website after creating your own Parse App:
public static String PARSE_APP_ID = "K7SCPO9S6zywk3DMoEskABkJCOOWNkwx6Lfew2hy";
public static String PARSE_CLIENT_KEY = "kC36ZLG7UWs31cPpLUN3M8RkS6K6BK544MFYm3hD";
Custom colors
You can edit the
HEX values of the following variables as you wish. The main color of the app and some other Views will be affected by your change:
public static String MAIN_COLOR = "#f76830";
public static String LIGHT_GREY = "#FFF8F8F8";
PLEASE NOTE that not all views will be affected by changing the HEX values above, you may still need to go through some XML file and adjust the colors on your own with the right-side Attributes panel.
Custom fonts
This App uses some custom fonts for Buttons, TextViews ans EditTexts. The font files are stored into the
app/src/main/assets/font
folder and are declared in this line:
public static Typeface osBold, osSemibold, osRegular, osExtraBold, osLight, osItalic, cunia;
Such 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, then you have to instantiate it at the end of the
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 osBold, osSemibold, osRegular, osExtraBold, osLight, osItalic, 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");
Default Location coordinates
You can edit the GPS coordinates of the
DEFAULT_LOCATION variable as you wish:
public static LatLng DEFAULT_LatLng(40.7143528, -74.0059731);
Distance range around a Location
This value is expressed in Km, but it's ok for Miles too since it's just a number. You can edit it as you wish, the app needs such value to search for Events around a city:
public static double EVENTS_LOCATION_RANGE_KM = 100;
Popular Cities array
The following array contains a list of Cities and GPS coordinates that are present in the app:
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.
Based on this syntax, you can add new items below the
"Tokyo_Japan_35.6894875_139.6917064"
one, the application will show them in the
Search City screen.
Categories array
The array below lists a few categories:
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.
Support email address
You must replace the following string with a valid email adress where you want people to contact you in case of questions, support or even account deletion requests - accordingly to
EU GDPR:
public static String SUPPORT_EMAIL_ADDRESS = "[email protected]";
Parse Dashboard Classes and Utility functions
This section is a list of strings that the app calls to perform queries to the Parse Server database - aka Parse Dashboard - and it contains a few useful custom global variables and functions.
Do not edit those variables and instances unless you're an experienced Android developer, otherwise the app will not work properly.