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.

Android is a mobile operating system developed by a consortium of developers known as the Open Handset Alliance, with the main contributor and commercial marketer being Google. It is based on a modified version of the Linux kernel and other open source software and is designed primarily for touchscreen mobile devices such as smartphones and tablets. In addition, Google has further developed Android TV for televisions, Android Auto for cars, and Wear OS for wrist watches, each with a specialized user interface. Variants of Android are also used on game consoles, digital cameras, PCs, and other electronics.

Tag Usage

When asking about your app force closing or crashing, you have to include an MCVE, which has to include a stacktrace. See also: How to Ask

When adding additional tags to questions, please use the Android-specific tags such as , , , and not individual tags like , or .

For non-developer Android questions, see Android Enthusiasts Stack Exchange.

Manufacturer-Monitored Tags

These tags are used for developer assistance by Android device manufacturers for their specific devices:

ISV-Monitored Tags

These tags are meant for libraries, services, etc. for Android that are monitored by their respective developers:

( (now deprecated))

Resources

Android Versions

Official API Documentation

Applications

Source Code and Building

Developers

Playlist of videos for Google I/O.

  • Android Tools Project Site
    On this site, you will find information about the Developer Tools for Android (Dalvik Debug Monitor Server (DDMS), hierarchy viewer, lint) and various tips & how-to documents.

In addition, there are other Android developer support sites, operating in other languages.

For non-developer questions, see the Android Enthusiasts Stack Exchange site.

Android Programming Books

Android Loggers

  • logger - Simple, pretty and powerful logger for android
  • timber - A logger with a small, extensible API that provides utility on top of Android's normal Log class.
  • LoggingInterceptor - An OkHttp interceptor which pretty logs request and response data.
  • Bugfender - Upload your logs and check them online, specially made for mobile
  • EzyLogger - Simple Lightweight logger
  • Logback Android - Logback port to Android which provides a highly configurable logging framework for Android apps.

Chat Rooms

Chat about Android with other Stack Overflow users:

Stack Exchange

IRC:

Development IDEs

Tutorials & Examples

Online Courses

Online Specialization Verified Courses

Sites that list Android libraries

Open-sourced Android apps

Samples

Podcasts for Android

Weekly

Frequently Asked Questions

1409497 questions
719
votes
64 answers

How to check internet access on Android? InetAddress never times out

I got a AsyncTask that is supposed to check the network access to a host name. But the doInBackground() is never timed out. Anyone have a clue? public class HostAvailabilityTask extends AsyncTask { private Main main; …
Vidar Vestnes
  • 42,644
  • 28
  • 86
  • 100
719
votes
19 answers

How to make a background 20% transparent on Android

How do I make the background of a Textview about 20% transparent (not fully transparent), where there is a color in the background (i.e. white)?
Adham
  • 63,550
  • 98
  • 229
  • 344
718
votes
32 answers

Get the current language in device

How can we get the current language selected in the Android device?
Pinki
  • 21,723
  • 16
  • 55
  • 88
718
votes
15 answers

Set ImageView width and height programmatically?

How can I set an ImageView's width and height programmatically?
praveenb
  • 10,549
  • 14
  • 61
  • 83
717
votes
28 answers

How to start new activity on button click

In an Android application, how do you start a new activity (GUI) when a button in another activity is clicked, and how do you pass data between these two activities?
Adham
  • 63,550
  • 98
  • 229
  • 344
716
votes
12 answers

How can I create a keystore?

What are the steps to create a keystore for android? I need to use google maps in my app and I don't know what steps I missed. Please provide me with the specific detailed steps (I didn't understand it from the guides).
user482762
  • 7,183
  • 4
  • 16
  • 6
711
votes
21 answers

AsyncTask Android example

I was reading about AsyncTask, and I tried the simple program below. But it does not seem to work. How can I make it work? public class AsyncTaskActivity extends Activity { Button btn; /** Called when the activity is first created. */ …
Fox
  • 9,384
  • 13
  • 42
  • 63
704
votes
58 answers

How to make an ImageView with rounded corners?

In Android, an ImageView is a rectangle by default. How can I make it a rounded rectangle (clip off all 4 corners of my Bitmap to be rounded rectangles) in the ImageView? Note that from 2021 onwards, simply use ShapeableImageView
michael
  • 106,540
  • 116
  • 246
  • 346
699
votes
25 answers

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 trying to send the mail on button click directly…
Vinayak Bevinakatti
  • 40,205
  • 25
  • 108
  • 139
694
votes
28 answers

Dialog throwing "Unable to add window — token null is not for an application” with getApplication() as context

My Activity is trying to create an AlertDialog which requires a Context as a parameter. This works as expected if I use: AlertDialog.Builder builder = new AlertDialog.Builder(this); However, I am leery of using "this" as a context due to the…
gymshoe
  • 7,495
  • 5
  • 20
  • 21
690
votes
13 answers

What does android:layout_weight mean?

I don't understand how to use this attribute. Can anyone tell me more about it?
Mojiiz
  • 7,898
  • 6
  • 26
  • 25
689
votes
19 answers

Error in launching AVD with AMD processor

I have Windows 8.1 pro with an AMD processor. I installed the Android SDK and Eclipse. It works but the problem is that when I Create AVD and launch it shows this error: emulator: ERROR: x86 emulation currently requires hardware acceleration! …
Jitesh Gaikwad
  • 7,009
  • 3
  • 11
  • 3
685
votes
8 answers

Android error: Failed to install *.apk on device *: timeout

I'm getting this error from time to time and don't know what causing this: When trying to run/debug an Android app on a real device (Galaxy Samsung S in my case) I'm getting the following error in the Console: Failed to install *.apk on device *:…
Arye Rosenstein
  • 4,246
  • 3
  • 18
  • 15
685
votes
41 answers

Fullscreen Activity in Android?

How do I make an activity full screen? Without the notification bar.
Praveen
  • 90,477
  • 74
  • 177
  • 219
684
votes
30 answers

Android Drawing Separator/Divider Line in Layout?

I would like to draw a line right in the middle of a layout and use it as a separator of other items like TextView. Is there a good widget for this. I don't really want to use an image as it would be hard to match the other components to it. And I…
Androider
  • 21,125
  • 36
  • 99
  • 158