Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [android]

Android is Google's mobile operating system, used for programming or developing digital devices (Smartphones, Tablets, Automobiles, TVs, Wear, Glass, IoT). For topics related to Android, use Android-specific tags such as android-intent, android-activity, android-adapter, etc. For questions other than development or programming but related to the Android framework, use this link: https://android.stackexchange.com.

234 votes
3 answers
42k views

How to use ThreeTenABP in Android Project

I'm using Android Studio 2.1.2 and my Java setup is the following: >java -version > openjdk version "1.8.0_91" > OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~15.10....
kael's user avatar
  • 6,675
885 votes
23 answers
559k 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 ...
nhaarman's user avatar
  • 100k
2735 votes
65 answers
1.5m views

How can 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....
bejoy george's user avatar
  • 29.7k
1537 votes
53 answers
1.3m 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-...
UMAR-MOBITSOLUTIONS's user avatar
320 votes
16 answers
138k views

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

I have created 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 ...
185 votes
3 answers
582k views

How do I parse JSON in Android? [duplicate]

How do I parse a JSON feed in Android?
iamlukeyb's user avatar
  • 6,537
1389 votes
44 answers
652k views

Strange OutOfMemory issue while loading an image to a Bitmap object

I have a ListView with a couple of image buttons on each row. When the user clicks the list row, it launches a new activity. I have had to build my own tabs because of an issue with the camera layout. ...
2084 votes
41 answers
579k views

How to lazy load images in ListView in Android

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 images so while the text displays, the UI ...
lostInTransit's user avatar
2871 votes
35 answers
910k views

How can I save an activity state using the save instance state?

I've been working on the 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; ...
Bernard's user avatar
  • 45.5k
59 votes
6 answers
47k views

How to return DataSnapshot value as a result of a method?

I don't have much experience with Java. I'm not sure if this question is stupid, but I need to get a user name from Firebase realtime database and return this name as a result of this method. So, I ...
Ilya S's user avatar
  • 751
598 votes
30 answers
756k views

How to use SharedPreferences in Android to store, fetch and edit values [closed]

I want to store a time value and need to retrieve and edit it. How can I use SharedPreferences to do this?
Muhammad Maqsoodur Rehman's user avatar
190 votes
12 answers
124k views

Android permission doesn't work even if I have declared it

I'm trying to write code to send an SMS from an Android app, but when I try to send the SMS it sends me back the error: 09-17 18:37:29.974 12847-12847/**.**.****E/AndroidRuntime﹕ FATAL EXCEPTION: ...
Nathan Loudjani's user avatar
1107 votes
14 answers
923k views

How to manage startActivityForResult on Android

In my activity, I'm calling a second activity from the main activity by startActivityForResult. In my second activity, there are some methods that finish this activity (maybe without a result), ...
Hesam's user avatar
  • 53.2k
701 votes
25 answers
477k 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 ...
Vinayak Bevinakatti's user avatar
3095 votes
54 answers
1.3m views

Is there a unique Android device ID?

Do Android devices have a unique ID, and if so, what is a simple way to access it using Java?
Tyler's user avatar
  • 31.5k

15 30 50 per page
1
2 3 4 5
10253