Android Wallpaper App

(Flickr API based)
Documentation version 1.4

Getting Started

This documentation will help you to build an android wallpaper app yourself; how create and manage fickr group, get api key and how to setup in android studio. This projects is fully customizable so if you want you can customize and add more feature.

Flickr

Flickr is an image sharing site so we can use it as image server. Don’t warry It’s free. Flickr give us 1TB space for normal user, by purchasing pro user we can get more space and service. The main advantage is we can use other user image for our app. How to do that? Firstly we need to create a group on flickr and invite other user who can upload image to our group. In this way we can use other image for our app. That simple!

Creating Group

Steps

  1. Go to https://flickr.com and sign in or sign up if you don’t have an account
  2. Then click menu You >> groups or go to https://www.flickr.com/groups
  3. Click Create group button


  4. Choose which sort of group you'd like to start. In this case, I like to create a public group


  5. Enter your group name and description (optional) and click NEXT


  6. You can change group information for non-member on you group page and click NEXT


  7. If you want to change group member information. In my case I like to keep default information. Click ALL DONE


  8. Congratulation, your group is created. Now you can change icon, banner and information.
    Now you can add photo by clicking +Add Photos or invite Friends for join your group.


  9. If you terrible to get group id then goto https://www.webfx.com/tools/idgettr, enter full url into input box and click find button. you will get group id


  10. Please collect group id from URL. Example, if the group url is https://www.flickr.com/groups/3542655@N25/ then the group id is 3542655@N25

This is an example group


Upload Photo to Group

Steps

  1. Go to https://flickr.com and sign in or sign up if you don’t have an account
  2. Then Click upload icon from top right corner


  3. Drag & drop photo here or click Choose photos and video to upload button for browsing photo from your device


  4. After selecting photo you will see left menu. Now click Add tags and enter one or more tag as you want.


  5. Now for adding group please click Add groups menu then search your group and select. Then click Done button.


  6. Now you see your group icon (1) on left side and click Upload photo (2) button and a confirmation dialog will appeared. If everything fine then click Upload (3) button.


  7. After uploading finish please go your group page you will see the photo you just uploaded.

Get Flickr API

Steps

  1. Go to https://www.flickr.com/services
  2. Click Create an App


  3. Click Request an API Key


  4. Now please choose what type of app you want to create. In my case I like create Non-Commercial. So I click APPLY FOR NON-COMMERCIAL KEY on left side.


  5. Enter information like name and description and click submit


  6. Here you can see API key and Secret key
  7. Collect the Api key for future use

Note: please don’t share these key with anyone

Setting up Android App

This app developed in Android studio 3.1.2 and in the Android SDK Manager make sure you have the following installed:

  1. Android studio 3.1.2
  2. Gradle version 4.4
  3. Gradle plugin version 3.1.2
  4. Android Sdk Version 27
  5. Google pay-services version 15.0.1
  6. Android SDK Tools 27.1.1

Open or Importing project

Steps

  1. Open up Android Studio and click open an existing Android Studio project
  2. Browse project folder and click OK
  3. Wait few moments for android studio finishing gradle sync and build. After that you are free to run the project.

Disable Instant Run

In this project, I used Sugar-ORM as database library and this library doesn't support Instant Run.
So you need to disable instant run. For do this please go to Android Studio Settings or Preferences (for Windows) -> Build,Execution,Deployment -> Instant Run. Then deselect the Enable Instant Run checkbox at the top.


Rename package name

Steps

  1. Click small gear icon and Uncheck Hide empty middle package
  2. Now right click on package name and select Refactor >> Rename
  3. Click Rename Package to rename package
  4. Now change package which you like and click Refactor
  5. Click Do Refactor to change package name
  6. Open build.gradle file from app module and change applicationId as the same package name
  7. Open AndroidManifest.xml file from app >> Manifests and change Package(2) and value of meta-data DOMAIN_PACKAGE_NAME(3) as the same package name

App Configuration

Open FlickrManager java file and Put your flickr API key and Group id mentioned image below

Add app icon

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.

Change App Name

To change app name please open app/res/values/strings.xml and change app_name key. In this case this app name is Wallpapers HD

Update or add Tag

(Remove from version-1.0.5. Some buyer report me that tags handling are difficult.)

Open Tag java file from app/java/package/model and you will find the tag list. If you have some java experience then it easy to update or add more tag.

If you are beginner in java or not a programmer then I’m trying to explain how to do that. See the screenshot:
1 is Tag name who is shown in app tag page.
2 is the alias which is used to search image from flickr group.
3 is the image url which is shown background of tag in app.

Please not that alias is not allow to use space or any special character. So remove any space or special character. For example please see below

Admob Integration

Open AdConfig file from app/java/package/admob and flow the instruction below.

  1. You can enable or disable ad from here
  2. Put here your admob App id
  3. Create a banner ad unit on admob and put here the ad unit id
  4. Create an interstitial Ad on AdMob and paste the AD unit Id here

Note: app id and all ad unit id are test id. You need to replace your own app id and ad unit id.

If you need help please contact me at alex31nbs@gmail.com

Thank you