Giter Club home page Giter Club logo

randomwallpapergeneratorandroidapp's Introduction

RandomWallpaperGeneratorAndroidApp

A simple android app to get a new random Bing wallpaper using Bing's wallpaper API.

Methodology

The app uses Bing's API to get a JSOn in response.

API Url: http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=2&mkt=en-US

When the idx parameter is random and n is set to one, we get a random URL in response. Wallpaper is set after downloading the image from this URL.

A sample Json response:

{
    images: [
        {
            startdate: "20160109",
            fullstartdate: "201601090800",
            enddate: "20160110",
            url: "/az/hprichbg/rb/RockyFog_EN-US10594321931_1920x1080.jpg",
            urlbase: "/az/hprichbg/rb/RockyFog_EN-US10594321931",
            copyright: "The Alberta Rockies in Kananaskis Country, Canada (© Victor Liu/Solent News/REX Shutterstock)",
            copyrightlink: "http://www.bing.com/search?q=Kananaskis+Country&form=hpcapt&filters=HpDate:%2220160109_0800%22",
            wp: true,
            hsh: "3cf47075957495fe391088df109cb0c6",
            drk: 1,
            top: 1,
            bot: 1,
            hs: [
                {
                    desc: "Under the icy peaks and clouds…",
                    link: "http://www.bing.com/images/search?q=Kananaskis+Country+Alberta,+Canada&FORM=hphot1",
                    query: "A Rocky Mountain playground",
                    locx: 16,
                    locy: 40
                },
                {
                    desc: "Humans aren't the only ones enjoying the 11 parks and reserves that comprise this park system.",
                    link: "http://www.bing.com/videos/search?q=AlbertaParks+Bear+Day+what+goes+on+when+you+are+not+there&form=hphot2#view=detail&mid=991A206CC98614864AC8991A206CC98614864AC8",
                    query: "What goes on when we're not around?",
                    locx: 32,
                    locy: 41
                },
                {
                    desc: "Though the mountain range dominates the scenery…",
                    link: "http://www.bing.com/search?q=Kananaskis+River&form=hphot3",
                    query: "This wilderness was named for the river that flows through it",
                    locx: 58,
                    locy: 40
                }
            ],
            msg: [
                
            ]
        },
        {
            startdate: "20160108",
            fullstartdate: "201601080800",
            enddate: "20160109",
            url: "/az/hprichbg/rb/StoatWinter_EN-US8766454928_1920x1080.jpg",
            urlbase: "/az/hprichbg/rb/StoatWinter_EN-US8766454928",
            copyright: "Stoat (aka ermine) in the Jura Mountains, France (© Biosphoto/SuperStock)",
            copyrightlink: "http://www.bing.com/search?q=stoat+animal&form=hpcapt&filters=HpDate:%2220160108_0800%22",
            wp: false,
            hsh: "1b90a9919cfde0ce9d2b717d9ed52159",
            drk: 1,
            top: 1,
            bot: 1,
            hs: [
                {
                    desc: "No need to be shy.",
                    link: "http://www.bing.com/images/search?q=ermine+in+snow&form=hphot1",
                    query: "Come on out so we can get a good look at you",
                    locx: 23,
                    locy: 35
                },
                {
                    desc: "Our fuzzy friend lives in a sub-alpine range famous…",
                    link: "http://www.bing.com/search?q=Jura+Mountains&form=hphot2",
                    query: "For Nordic skiing",
                    locx: 37,
                    locy: 37
                },
                {
                    desc: "When they're young, these sleek weasels love to jump and play.",
                    link: "http://www.bing.com/videos/search?q=stoat+Attenborough&go=Submit+Query&qs=bs&form=hphot3#view=detail&mid=0333ACF20A0C550B8A360333ACF20A0C550B8A36",
                    query: "But that's all just to hone their deadly hunting skills",
                    locx: 66,
                    locy: 42
                }
            ],
            msg: [
                
            ]
        }
    ],
    tooltips: {
        loading: "Loading...",
        previous: "Previous",
        next: "Next",
        walle: "This image is not available to download as wallpaper.",
        walls: "Download this image. Use of this image is restricted to wallpaper only."
    }
}

How to use

Step 1: Launch the app.

screenshot_2016-01-11-01-59-57_com example sampannakahu helloworld

Step 2: Tap on the 'Change wallpaper' button.

The app will hit Bing's API for wallpapers and would download a wallpaper at random from the list of URL's. It will also set the wallpaper automatically. screenshot_2016-01-11-02-00-13_com example sampannakahu helloworld

Step 3: See the wallpaper changed in the home screen.

screenshot_2016-01-11-02-00-21_com miui home

randomwallpapergeneratorandroidapp's People

Contributors

sampannakahu avatar sampyash avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

vickneshk

randomwallpapergeneratorandroidapp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.