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 8448873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:32:32+00:00 2026-06-10T10:32:32+00:00

In my application i have a listView. I populated this listView 10 items at

  • 0

In my application i have a listView.

I populated this listView 10 items at a time.

So, i fetch the 1st 10 items in the background when i am showing a spalsh screen. and once the splash screen goes away user can see the 1st 10 items.

Now in the Activity which contains this listView i wrote something like this:

onLastItemReached(){
    getNextten();
}

works fine. and when i am going to someother activity from this listViewActivity i set the flag so that all the items browsed till then will be retained when back is pressed(i mean if user scrolled down to 100 items and clicked one item and went to some activity and clicks device back button, he will be shown the 100th item and the rest 99 items doesn’t need to be fetched again)

the problem is when i close the application and open it after some 5-10 mins it gets crahsed saying:

ArrayIndexOutOfBoundsException

if i am reopening it in 1-3 mins it works fine.

Sorry i cannot post any code because all the activity has around 800 lines.

Any one has any idea why i get this exception always. and 1 thing i want to know is, is there anything like if an app is in background for more than 5 mins remove all its data

Edit:

my closing my application, i mean when i am on the ListView Screen i press Home button, reopen the app after 5-10 mins

This is the StackTrace i get, I was trying to Handle unCaughtExceptions:

threadid=1: thread exiting with uncaught exception (group=0x40020660)
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Android.WiC_MobileApp/com.Android.WiC_MobileApp.FeedListViewActivity}: java.lang.ArrayIndexOutOfBoundsException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1728)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1747)
at android.app.ActivityThread.access$1500(ActivityThread.java:155)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)

So after looking at my log cat it says the error is at line 201, and that line contains:

    Log.d("array of product names", SplashActivity.products_array[0] + "--"
            + SplashActivity.products_array[1]);

This is an array populated in SplashActivity and made public static.

  • 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-06-10T10:32:33+00:00Added an answer on June 10, 2026 at 10:32 am

    if an app is in background for more than 5 mins remove all its data

    This could actually happen within 1 minute. It’s just dependent on the environment that the system is running on. When you press the home button (or back button on the top activity) the system will put your app in a hibernation sort of mode. It keeps it in memory until that memory is needed. This allows the user to quickly go back to it on the event that they simply wanted to switch real quick and go back. After a few minutes though, if the user opened up a game or something, the OS may decide to wipe the app from memory. In which case, when the user reopens your app, you have to rebuild everything from scratch.

    The reason your app crashes is because you’re trying to retrieve the element before the app has actually rebuilt the ListView. If the app is still in memory, it works because everything is still built. If the app was removed, then the list must be rebuilt, re-inflated, or whatever. Then you try to retrieve the element.

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

Sidebar

Related Questions

I'm developing an Android 3.1 application. I have a ListView with items with this
I have an application that has 2 screens. The first screen has a ListView
In my application I have a function to populate listview.I want to run this
i created a MonoDroid application where i have a ListView populated with a custom
In a WPF application I have a ListView: <ListView Name=ItemSelList ItemsSource={Binding ItemColl} SelectionChanged=ItemSelList_SelectionChanged> <ListView.View>
I have a ListView item in my application. The scroll position does not get
In my application, I have a listview whose list item consists of a TextView
I have an Android application with a ListView in it, the ListView will setup
In My application have time consuming process.There fore i try to do that operation
In a C# Winforms Application I have a ListView control. I am using the

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.