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

  • SEARCH
  • Home
  • 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 7032099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:53:26+00:00 2026-05-28T00:53:26+00:00

I have a custom image preference in my Live Wallpaper that allows a user

  • 0

I have a custom image preference in my Live Wallpaper that allows a user to choose an image from their SD card to use as a background. I got the code from here and haven’t modified it, so it’s almost exactly the same except for variable or object names.

I’ve been getting a few of these stack traces in my dev console:

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=file:///mnt/sdcard/com.idunnolol.rageface/rage_fullpanel.png }} to activity {gilleland.software.pixelrain/gilleland.software.pixelrain.PixelRainSettings}: java.lang.NullPointerException
at android.app.ActivityThread.deliverResults(ActivityThread.java:3515)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3557)
at android.app.ActivityThread.access$2800(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2063)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at gilleland.software.pixelrain.PixelRainSettings.getRealPathFromURI(PixelRainSettings.java:107)
at gilleland.software.pixelrain.PixelRainSettings.onActivityResult(PixelRainSettings.java:90)
at android.app.Activity.dispatchActivityResult(Activity.java:3890)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3511)
... 11 more

I don’t get this exception on my own phone.

I’ve been searching for a while to figure out what’s causing the NullPointerException but most of the solutions I have found involve “ResultInfo{who=null, request=1, result=-1, data=null}”. The stack traces I’m getting actually have Intents with data…so I can’t figure out what the NullPointerException is from.

Any and all help is appreciated. I can provide any necessary code to help solve this.
Thanks!

  • 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-28T00:53:26+00:00Added an answer on May 28, 2026 at 12:53 am

    The requestCode and resultCode is correct, so I guess the problem is due to one of the variable pointer is not properly initialized in following section of code:

    Uri selectedImage = data.getData();   
    String RealPath;
    SharedPreferences customSharedPreference =        
    getSharedPreferences(fingerflashpro.SHARED_PREFS_NAME, Context.MODE_PRIVATE); 
    SharedPreferences.Editor editor = customSharedPreference.edit ();
    RealPath = getRealPathFromURI (selectedImage);
    editor.putString("image_custom", RealPath); 
    editor.commit(); 
    

    It’s probably something related to the selectedImage or RealPath. Comment out most of the codes and debug it line by line.

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

Sidebar

Related Questions

I have a custom image which I would like to use rather than the
I have a custom image control that gets rendered like this <img id=2344324_Img />
I have custom styled input submit buttons. I have a background image and then
I like to have a custom selected image when a user selects an item
I have a grouped table view; the table's background is a custom image. In
I have a custom image file where the first block of data is ASCII
I have a custom UITableViewCell which has an image & and some text. When
I have a custom list, and I've added a 'Page Image' field by clicking
I have a UITableView whose cells contain custom ImageViews that asynchronously load the images
I have custom coded several enterprise applications for mid to large organizations to use

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.