Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7702431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:13:32+00:00 2026-05-31T23:13:32+00:00

My question is regarding this post Is it possible to set an animated gif

  • 0

My question is regarding this post

Is it possible to set an animated gif file as live wallpaper in android?

The method given in this post does not seem to work. When i put my animated .gif file in /res/raw folder, there is an error which says that my file cannot be resolved or is not a field. Is there something that i should know about the resources in raw folder or there is some other problem. Following is the code.

BelleEngine() throws IOException {

        InputStream is = getResources().openRawResource(R.raw.ballerina);
        if (is != null) {
            try {
                mBelle = Movie.decodeStream(is);
                mBelleDuration = mBelle.duration();
            } finally {
                is.close();
            }
        } else {
            throw new IOException("Unable to open R.raw.belle");
        }

Thanks for the help in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:13:34+00:00Added an answer on May 31, 2026 at 11:13 pm

    I have tried the example it works for me. Also i have tried this with different .gif images and it doesn’t seems that their is any problem. My code for that is .
    {

     /**
         * Method to init suitable wallpaper according to time.
         */
        private void initWallpaperAccordingtoTime(InputStream inputStream) {
    
            if (inputStream != null) {
                try {
                    wallpaperGifStream = Movie.decodeStream(inputStream);
                    if (wallpaperGifStream != null) {
                        duration = wallpaperGifStream.duration();
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                } finally {
                    try {
                        inputStream.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
    
        }
    

    Call to this method will be as follows.

     initWallpaperAccordingtoTime(getResources().openRawResource(
                 R.raw.android_apple));
    

    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yesterday I posted this question regarding using lambdas inside of a Join() method to
I have a question regarding checkboxes. <form method=post> I speak the following languages: <input
I was reading this post and had a question that I didn't think it
Just finished reading this blog post: http://www.skorks.com/2010/03/an-interview-question-that-prints-out-its-own-source-code-in-ruby/ In it, the author argues the case
Again I have a question regarding this plugin: http://t.wits.sg/2008/06/20/jquery-progress-bar-11/ What I want to achieve
There are many question regarding this topic but there is no clear answer. Although
First of all there is a partial question regarding this, but it is not
Yesterday, I asked this question regarding best practices for a simple information retrieval system
Question regarding how to setup dbase relationships (newbie, this may be trivial) Followed the
I have a question regarding to the code that OCRApiService.com provides to devs. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.