Ultimate Wallpaper App Template

Documentation version 1.5


Getting Started #back to top

This documentation will help you familiarise yourself with the 'Ultimate Wallpaper App Template' Android App and the web based Admin page. It is suggested that you first upload the admin page to your server and make sure it is working before continuing to the Android App. The Android App will work fine using the demo server, however it is required to setup firebase for it to work well without errors. The setup of Firebase is explained in the Admin Page Video Tutorial.

Setting up the admin Page #back to top


Before You Start

  • 1. Make sure your server supports PHP 7.3 or above and MySQL.
  • 2. Make sure your server is Apache.
  • 3. The template does not support subfolders(www.eg.com/app). Use subdomains instead (app.eg.com).
  • 4. Increase your server memory limit from php.ini to at least 128M (memory_limit = 128M). If not increased you will have problems uploading larger images.

Uploading To Server

  • Step 1 - Put your database details (Host, database name, user name, and password) in config.ini. The fields are marked with red below. Also, replace the 'serverurl' with your server url and the 'sharetwittertag' with your twitter tag (used for sharing).

  • Step 2 - Upload the contents of the 'Server Side Code' to your server. Make sure you don't forget the .htaccess (It might be hidden by default on your computer).

  • Step 3 - Create a new MySQL database and import 'wallpaper_database_v1.sql'.

  • Step 4 - Access the /index.php file that you just uploaded to your server, using your browser. The default login credentials are:
    										Username: admin@gmail.com
    										Password: pass
    				        			

Setting Firebase Push Notifications

  • Step 1 - Go to your Firebase Console, go to settings->cloud messaging and get your server key (API_ACCESS_KEY). Put this in config.ini. The field is marked with green above.

  • Step 2 - Admin Page Done!

Setting up the Android App#back to top


Before You Start

  1. Make sure your have Android Studio 3.1.1 installed and in the Android SDK Manager make sure you have the following installed:

    • Build tools v28.0.3
    • Google USB Driver
    • Android API 28 SDK

  2. Try to place the project file as close to root (C:/) as possible as windows has a path character limit of 240chars. So, if you get the error: "Failed to crunch file...", reduce the path length.


Importing and running

  • Step 1 - Open up Android Studio and click 'open an existing Android Studio project'.


  • Step 2 - Drag and drop the 'WallpaperApp' folder in the dialog to go quickly to the folder.

  • Step 3 - Make sure 'WallpaperApp' is highlighted and click 'ok'.


  • Step 4 - Go to your Firebase Console and download the 'google-services.json' file and replace the placeholder in app/google-services.json. This step is included in the Admin Page video - If you skip this step you will encounter an error during compile time.


  • Step 5 - Press the Play button to test the app on the emulator or connect your phone via usb to your computer to try it on your phone.


Changing Package name

This step must be done else you will have problems uploading to Google play and the Rate feature will not work.

  • Step 1 - Make sure the 'Compact Empty Middle Packages' option is deselected as shown below.


  • Step 2 - Rename the package id by right clicking on 'neurondigital' and selecting 'refactor' and 'rename' as shown below.


  • Step 3 - Click Rename package.


  • Step 4 - In the popup menu type in your company name. Then press 'refactor' and in the next popup window press 'Do Refactor'. Do the same for 'wallpaperapp'. The package name should be in this format: com.yourcompany.AppName


  • Step 5 - Open app/build.gradle and put in the same package id as before instead of the 'com.neurondigital.wallpaperapp'. This is shown below.


App Customisation

  • Step 1 - Put in your Server url in Configurations.java


  • Step 2 - Replace the share deep link url in res/strings.xml. When the user opens a url that matches the url you specified here, it would be opened up in the Wallpaper app. If the app is not installed, the url would be opened on the browser, so make sure to choose a domain owned by you and has the server on it. eg: http://wallpaper.neurondigital.com/1


Replace icon and Images

  1. The images can be found under app/res/drawable. To replace the images just copy/paste the image in the drawable folder to replace the other.

  2. The icons can be found in app/res/mipmap. Notice that there are different sizes. To replace the icons just right-click->new->Image Asset and select your image.


Add AdMob interstitial Ads (optional)

  • Create an interstitial Ad on AdMob and paste the Admob App Id and AD unit Id in the strings.xml file. The Ad displays when the user clicks a property in the home screen. Make sure to add this to start making money from your App. The display rate can be changed from strings.xml from the ad_shows_every_X_clicks parameter.


Add AdMob Banner Ads - Bottom (optional)

  • Like the interstitial Ad, create a Banner Ad on AdMob and paste the Admob App Id and the AD unit Id in the strings.xml file. The Ad displays in the bottom of the screen. Ideally to not annoy the user, it's either the banner or the interstitial ad, so you may wish to leave one of the Ad IDs in strings.xml empty.


Add AdMob Banner Ads - Between wallpapers (optional)

  • Same as the bottom banner, but this is displayed between the wallpapers. Change banner_ad_unit_id_between_wallpapers_frequency to change how many ads to show. A value of 3 will show a banner after every 3 wallpaper thumbnails.

    Please note that the ads are only shown after 10 wallpapers. This can be changed from WallpaperAdapter.java line 44: int START_ADS_AT_POSITION = 10;


Google Analytics (optional)

  1. Google Analytics in Android Apps is now depricated. The new method is now using Firebase, which is also supported by this template.

  2. Create a new google Analytics property and you'll be provided with a tracking id which should have this format: "UA-xxxxxxxx-xx". Put this tracking id in strings.xml in the 'google_analytics_id' field.


Facebook Login

The App uses Facebook Authentication for User Login. So you need to create a facebook app.

  • Step 1 - Go to Facebook for developers. and Create a new App ID.

  • Step 2 - Get the generated Facebook App id and fb login protocol scheme and put them in strings.xml.

  • Step 3 - In the Facebook Page, click the '+ Add Product' button to add the Facebook login Feature. Then Go to Settings and click the '+ Add Platforms' to add the Android Platform. This will ask you for a Key Hash. To obtain it, run the app while your phone/emulator is connected to Android studio and in the Android Monitor/logcat search for 'hash'. Remember that you need to do this twice. One for the debug app in Android Studio to test while Running in Android Studio. Secondly, you need to do this after generating your .apk file, since the exported .apk file will have a different hash key.


RateBolt

The App has Ratebolt integrated to improve your Ratings on Google Play. Ratebolt will only ask users who rate your app 4/5 stars to rate you on Google Play. The rest will be asked to provide feedback. Ratebolt also provides statistics and user feedback on an online dashboard. To use Ratebolt you need to create an account and get an App API Key:

  • Step 1 - Go To http://ratebolt.com/panel/signup and Create a new Ratebolt Account if you don't have one.

  • Step 2 - Create a new App to get an API KEY. Copy this Api Key to Strings.xml, in the 'ratebolt_api_key' field.

  • Step 3 - Use the Ratebolt Dashboard to track how your users are rating you and read any user feedback.


In-App Purchase

To use this feature you need to purchase an 'Extended License' of the template from CodeCanyon. This feature is not covered in the 'Regular License.' If you purchased the Extended License, contact the developer to get the extra code required to use this feature.

  • Step 1 - Contact Developer to get the extra code required to use this feature

  • Step 2 - The template allows for the user to purchase a premium upgrade to remove ads using google Play In-app Payments. Before doing so, create your app in Google Play Dashboard and locate the 'Public Key' as it can seen below:

  • Step 3 - Then add a new in-app product and give it a Product id.

  • Step 4 - Put your Public Key and product id in configuration.java:

  • Step 5 - In AndroidManifest.xml uncomment the Billing permission:


Translation

  • All translatable text is contained within the strings.xml file.


Export your App as a .APK for Google Play

  • Go to Build| Generate Signed APK... and export the .APK file.


Done!

Make sure to keep up with the template updates and bug fixes on our facebook page.

Advanced Customisation#back to top

The template has 3 Main Configuration Files which give you different options:

Android App
  1. Configurations.java
  2. Strings.xml
Server Side
  1. Config.ini

Below are some of the changes that you might want to perform in your project.

Changing the main screen Tabs

From Configurations.java
This can be done by changing the following code:

final static int TAB_CATEGORIES = 0, TAB_RECENT = 1, TAB_BEST_RATED = 2, TAB_MOST_VIEWED = 3, TAB_MOST_USED = 4, TAB_ME = 5;
public final static int[] HOME_TABS = new int[]{TAB_CATEGORIES, TAB_RECENT, TAB_BEST_RATED, TAB_MOST_VIEWED, TAB_MOST_USED, TAB_ME};
public final static int[] HOME_TABS_NAMES = new int[]{R.string.tab_categories, R.string.tab_recent, R.string.tab_best_rated, R.string.tab_most_viewed, R.string.tab_most_used,R.string.tab_me };

The top line lists all the available tabs. To edit, just remove any tabs that you don't want from the 2nd + 3rd line. Example, to display only the Recent Tab:

public final static int[] HOME_TABS = new int[]{TAB_RECENT};
public final static int[] HOME_TABS_NAMES = new int[]{R.string.tab_recent};

Enable/Disable User login

From Configurations.java
User Login are enabled by default. This can be disabled from the below code:

public final static boolean ENABLE_USER_SYSTEM = false; 

Enable/Disable User Wallpaper Upload

From Configurations.java
Users can upload wallpapers by default. This can be disabled from the below code:

public final static boolean ALLOW_WALLPAPER_UPLOADS = false;

Disable Blog

From Configurations.java
Change ENABLE_NEWS to false to disable Blog.

public final static boolean ENABLE_NEWS = false;

Show Categories in Navigation Menu

From Configurations.java
Categories in the side menu are disabled by default. Enable by turning the following boolean to true:

public final static boolean DISPLAY_CATEGORIES_IN_NAVIGATION_DRAWER = true;

Support Desk #back to top

If you need any support,

  1. First check the FAQ questions of the item on codecanyon.
  2. If you don't find anything there check the item comments section.
  3. If you still don't find your answer it would be best to ask your question in the comments section for others to see.
  4. For private support, please send me a message via my Codecanyon page.

Support for my items includes:
  • * Responding to questions or problems regarding the item and its features
  • * Fixing bugs and reported issues
  • * Providing updates to ensure compatibility with new software versions
Item support does not include:
  • * Customization and installation services
  • * Support for third party software and plug-ins
Before seeking support, please...
  • * Make sure your question is a valid Theme Issue and not a customization request.
  • * Make sure you have read through the documentation and any related video guides before asking support on how to accomplish a task.
  • * Make sure to double check the template FAQs.
  • * If you have customized the template and now have an issue, back-track to make sure you didn't make a mistake. If you have made changes and can't find the issue, please provide us with your changelog.

Version History (Changelog) #back to top


						-----------------------------------------------------------------------------------------
						Version 1 - April 20th, 2018
						-----------------------------------------------------------------------------------------

						- Initial Upload
                        
                        -----------------------------------------------------------------------------------------
						Version 1.1 - April 26th, 2018
						-----------------------------------------------------------------------------------------

						- Fixed Bug related to proguard

                        -----------------------------------------------------------------------------------------
						Version 1.2 - May 4th, 2018
						-----------------------------------------------------------------------------------------

						- Bug Fix - App was crashing when 'skip' was pressed. This was due to a Firebase library update on May 2nd.
                        - Updated to gradle 4.4
                        - Bug Fix - SQL database was giving error when importing to MySQL 7 or above. sql file is now updated to v1.2

                        -----------------------------------------------------------------------------------------
						Version 1.3 - May 22th, 2018
						-----------------------------------------------------------------------------------------

						- Bug Fix - App was crushing when wallpaper was long clicked
                        - Bug Fix - When swipe to next is disabled and a wallpaper is clicked, the incorrect wallpaper was shown
                        - Bug Fix - Template was crashing on Android 8 with an error similar to 'Service not registered'
                        - Faster loading of wallpapers
                        - Loading bar when wallpaper is being downloaded for sharing and to set as wallpaper
                        - Extended License feature - You can now lock certain wallpapers only for premium users
                        
                        -----------------------------------------------------------------------------------------
                        Version 1.4 – Nov 3rd, 2018
                        -----------------------------------------------------------------------------------------
                        - Bug Fix – Fixed zoom issue in NDviewpager
                        - Bug Fix – Download of original image instead of Preview.
                        - Bug Fix – Sql database downloaded field default value
                        - Bug Fix – only extended license – ‘Premium’ field was missing from database
                        - Bug Fix – Wallpaper upload was not working well. Fixed in adminhangler/itemmodel.php
                        - Bug Fix – Category screen was crashing when screen is rotated.
                        - General – Changed position of google() and jcenter() in build.gradle
                        - General – Update to AndroidX Api28
                        - General – Updated libraries to latest versions & Admob added support for app unit id
                        - General – Removed Google Analytics since it was deprecated by Google. Use Firebase Analytics instead.
                        - General – Firbase Notification support to Android Oreo+
                        
                        -----------------------------------------------------------------------------------------
                        Version 1.5 – Aug 9th, 2019
                        -----------------------------------------------------------------------------------------
                        - Bug Fix – Use ARGB_8888 to get better gradients in app
                        - Bug Fix – Reporting disabled when user system is disabled
                        - Bug Fix – Prevent issue when enter is pressed instead of save when saving a wallpaper.
                        - Bug Fix – Wallpaper saves even if no category is selected
                        - General – Downloaded images are added to Gallery
                        - General – usesCleartextTraffic is now set to true by default to avoid issues on first runs. It’s always a good practice to use https and set this to false.
                        - General – Added tags & title when Bulk uploading wallpapers
                        - General – Removed Firebase instance service (deprecated by firebase)
                        - General – Top notch setting set to default cutout mode
                        - General – Updated gradle and dependencies
                        - General – Fat free framework updated to 3.6
                        - General – PHP 7.3.8 Support!