All Questions

1794
votes
47answers
919962 views

How do I fix android.os.NetworkOnMainThreadException?

I got an error while running my Android project for RssReader. Code: URL url = new URL(urlToRssFeed); SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXPar...
550
votes
15answers
265577 views

Unfortunately MyApp has stopped. How can I solve this?

I am developing an application, and everytime I run it, I get the message: Unfortunately, MyApp has stopped. What can I do to solve this? About this question - obviously inspired by What is a...
45
votes
1answers
3112 views

How to use ThreeTenABP in Android Project

I'm adding this question because I'm new to Java and Android and I searched for hours trying to figure this out. The answer came from a combination of related answers, so I figured I'd document what I...
219
votes
12answers
88625 views

When is SQLiteOpenHelper onCreate() / onUpgrade() run?

I create my tables in my SQLiteOpenHelper onCreate() but receive SQLiteException: no such table or SQLiteException: no such column errors. Why? NOTE: (This is the amalgamated summary of...
942
votes
37answers
644466 views

How do I pass data between Activities in Android application?

I have a scenario where, after logging in through a login page, there will be a sign-out button on each activity. On clicking sign-out, I will be passing the session id of the signed in user to sign-...
1016
votes
40answers
549013 views

Strange out of memory issue while loading an image to a Bitmap object

I have a list view with a couple of image buttons on each row. When you click the list row, it launches a new activity. I have had to build my own tabs because of an issue with the camera layout. The ...
1649
votes
37answers
503503 views

Lazy load of images in ListView

I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load the images so while the text displays, th...
51
votes
4answers
383090 views

How to parse JSON in Android

Where can I find step-by-step instructions on how to parse a JSON feed in Android? I'm just an Android beginner wanting to learn.
2097
votes
24answers
609395 views

Saving Android Activity state using Save Instance State

I've been working on Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example: package com.android.hello; i...
558
votes
22answers
361192 views

Sending Email in Android using JavaMail API without using the default/built-in app

I am trying to create a mail sending application in Android. If I use: Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); This will launch the built-in Android application; I'm...

Previous Next