Professional Documents
Culture Documents
User Guide
Version 3.0.3
Table of Contents
Revision History.................................................................................................................................... 3
Introduction.......................................................................................................................................... 4
About The File.......................................................................................................................................4
Installing Required Softwares............................................................................................................... 5
Opening Android Project...................................................................................................................... 5
Renaming Application Package.............................................................................................................7
Inserting Data to Database................................................................................................................. 10
Setting Up Admob...............................................................................................................................14
Customizing Application Color............................................................................................................19
Customizing Image Resources and App Content................................................................................19
Running the Application..................................................................................................................... 21
Publishing Android App...................................................................................................................... 22
Updating App Version.........................................................................................................................24
About the Author................................................................................................................................24
Revision History
Author
Remarks
Version
Date
Taufan E.
3.0.1
22 January
2015
Taufan E.
3.0.2
12 February
2015
Taufan E.
3.0.3
8 March 2015
Introduction
Thank you for purchasing our item, Spatullr (previously known as Recipes App for Android). If you
have any questions that are beyond the scope of this user guide, please feel free to post the
questions via pongodev support forum. You can register an account using purchase using your
Envato username and the Purchase Code Item of this item. Thanks so much!
Do not forget to rate this item if you think it is great. And also like pongodev Facebook page here
and follow pongodev Twitter here to get the latest information about update and new items.
5
When you purchase this item you will get the following assets:
1. App source code
2. User guide
your Android project. After that click Choose button, See Illustration 1 for detail.
3. A new window will open Android project and the project will appear on Project window on
Android device that connected to your computer or Android emulator that you have
already created before. Click OK button to run the project.
6. If your Android project contain error and or asked to sync your gradle file, open
build.gradle(Module: app) file in Gradle scripts directory of the project then click Sync
Now... button at the top right corner of editor window to sync the project gradle.
Spatullr copyright 2015. All rights reserved. | pongodev.
7. When running this app you will find that the app still comes with dummy data. You need to
insert your own data and configure the app to meet your need.
project and select New > Package. See Illustration 4 for detail.
2. When Choose Destination Directory window appear, select /app/src/main/java and then
click OK button.
3. Insert your new package name in New Package window and click OK button. We suggest to
use your website name followed by your app name. For example, com.website.yourapp.
See Illustration 5 for detail.
4. After that, move all directories in old package to your new package by selecting all
5. You will see Select Refactoring window appear. Select Move everything from 6 directories
to another directory and click OK button. If there is a Problem Detected window appear,
just click Continue button. We will fix it later. All directories now are located in your new
package name. You can delete old package. You package name now should look like
Illustration 7.
6. As we have changed the package name, the default package name also change, we need to
configure some files that use package name to make the app works. First, go to
Spatullr copyright 2015. All rights reserved. | pongodev.
7. Replace com.pongodev.recipesapp with your own package name. Please insure that all
codes that use package name in AndroidManifest.xml have been changed with new
package name.
8. Next step is changing package name in gradle file. Open Build.gradle (Module: app) in
9. Change com.pongodev.recipesapp with your own package name. Once you change the
10
10. Other files which also required to change the package name are res/xml/searchable.xml
11. Last step, remove import com.pongodev.recipesapp.R; code in all java files.
12. Try to run the project to see the result. If you follow the steps above correctly, you will see
11
3. You will see that db_recipes consist of two tables, tbl_categories to store categories data
and tbl_recipes to store recipes data. You need to insert category data first before inserting
recipe data as they will be related. Select Browser Data tab and select tbl_categories under
Table dropdown. Select New Record button to add new category data and Delete Record
button to delete category data.
4. By default, there are already category data within the tbl_categories, you can delete them
and add your own data or update the data by double click on category_name data. As
category_id is auto increment you do not need to insert it, you only need to insert
category_name data but remember to take a note of all category_id because they will be
used in tbl_recipes.
12
5. After inserting or updating category data, the next data you need to insert is recipe. To
insert recipe data select tbl_recipes in Table dropdown. Please delete all dummy data in
that table and insert yours by clicking New Record button.
tbl_categories there is category called Beverage with category id 5, then when you create
orange juice recipe in tbl_recipes you need to insert 5(category id of Beverage) in
category_id of tbl_recipes.
13
7. Three other fields that you need to pay attention are ingredients, steps, and image. You can
insert html tag within ingredients and steps. We use bullet tag in database content see
Illustration 16.
8. For image field you need to store your images to res/drawable directory of your Android
project, you can delete the default images that used within this application. Please insure
that the files name are in lower case, without space, and the first character is not number.
Image file format must be in JPG and maximum size is 500x350 px And then, type the name
of the image you store in drawable directory to image field in tbl_recipes. Insert the name
14
9. If you have already inserted all of your data, do not forget to save your database. Click
Setting Up Admob
New version of Spatullr comes with the latest version of Admob which has different configuration
with previous version. To set up new version of Admob make sure that you have already upgraded
your Admob account. Go to apps.admob.com and login with your Admob account, if you have not
upgraded your account yet please see this guide from Google about how to do it. Below are steps
to set up Admob on Android project:
1. Login to Admob with your account and select Monetize menu, on Monetize window click
15
2. Select Add your app manually and fill App name and Platform form, click Add app button
when done.
3. Next step is selecting the ad type, select Banner and do some configuration to the banner,
16
4. You will get the Ad unit ID, copy that ID and click Done button to finish.
6. As this app use two ad formats, banner and interstitial ad, you need to create one ad unit
for interstitial. Click Monetize and select your app name on the left side and select + New
ad unit button to create new ad unit.
Spatullr copyright 2015. All rights reserved. | pongodev.
17
7. In ad format option, select Interstitial. And the rest configuration is similar with ad banner
8. You will get ad unit id for interstitial ad, copy the id. Open strings.xml and replace
9. If you have already published your app on Google Play you can link your app with Admob
by selecting Link your app in application list on Admob page. Search your app on Search
box and click + Select button to link the app. You can skip this step if you have not
published your app on Google Play yet.
18
10. Other ad configurations that also important are located in java/utils/Utils.java of Android
11. Change value of ARG_TRIGGER_VALUE to decide when the interstitial ad will appear. In
default the value is 3 where it means every three times user open detail screen the
interstitial ad will appear. Please set the value wisely so that it will not annoy your users.
Change value of ARG_ADMOB_VISIBILITY to 0 if you do not want to display Admob in your
app. Default value is 1 where the Admob is visible. ARG_ADMOB_DEVELOPMENT_TYPE is
used to test the ad. If you want to test your ad whether it display or not you can set the
value to 1 and 0 if you are ready to publish your app. The last configuration is
ARG_DEFAULT_CATEGORY_ID, this is used to set default category recipes that will be
display in two pane layout. You can find the category id in sqlite database of this app.
12. You can run the app to see the result of this ad configuration.
19
only work in Android 5.0 only), and text_color_primary is used for text title color in toolbar.
3. If you want to change the color based on Google Material Design guidelines, you can use
materialpalette.com as reference.
4. You can also change other color configuration such as for title color, row background color,
20
customization of image resources and app content:
1. To change launcher icon of the app, create your own icon in PNG format and name it as
ic_launcher.png. Create it in 4 different sizes with the following specifications:
a) 72x72 pixels in res/drawable-hdpi directory,
b) 48x48 pixels in res/drawable-mdpi directory,
c) 96x96 pixels in res/drawable-xhdpi directory, and
d) 192x192 pixels in res/drawable-xxhdpi directory.
2. Put those files in each directories via window explorer.
3. To change logo of the app, create logo in PNG format and name it as ic_logo.png. Create it in 4
different sizes with the following specifications:
a) 54x54 pixels in res/drawable-hdpi directory,
b) 36x36 pixels in res/drawable-mdpi directory,
c) 72x72 pixels in res/drawable-xhdpi directory, and
d) 108x108 pixels in res/drawable-xxhdpi directory.
4. Do the same thing like previous step, access drawable directories via window explorer.
5. The next image is splash screen logo, create image in PNG format and name it as
splash_screen_logo.png. Create it in 4 different sizes with the following specifications:
21
a) 375x184 pixels in res/drawable-hdpi directory,
b) 250x123 pixels in res/drawable-mdpi directory,
c) 500x245 pixels in res/drawable-xhdpi directory, and
d) 700x368 pixels in res/drawable-xxhdpi directory.
6. Besides splash screen logo there is splash screen image, store image in JPG with maximum size
1024x683 pixels to drawable directory.
7. The last customization is app content, you can customize the app content such as application name,
language, Google Play url via strings.xml that located in res/values directory. For Google Play url
you need to change com.your.package with your own package name.
USB Driver has been installed, if not download and install the package. (note that Google
USB Driver is not compatible in Mac OSX so you do not need to install it if you are using
Mac OSX)
22
2. Enable USB Debugging on your device, you can read here about how to enable USB
5. If you can see your device on Choose Device window, it means that driver of your Android
device is not installed on your computer yet. You need to install your Android device driver
first.
23
resources of the app and ensuring that the app has been run properly, the last step is publishing
your app to APK file. Below are step by step to publishing Android project to APK file:
1. on Android Studio, select Build > Generate Signed APK....
2. Generate Signed APK Wizard window will appear. Select app in module section then click
Next.
3. In the next step, if you have already created key store file click Choose existing... and insert
your key store password and alias. If have not created it yet, click Create new... to create
new key store file.
4. On New Key Store window fill all forms that required and click OK. See Illustration 33 for
detail.
5. Last is set the destination folder of APK files, and Build Type to release and click Finish
button.
24