Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Backwards Compatibility in Android Studio?

I'm a newbie to Android Development. Even though I referred the android developer website, I didn't figure out.

On the customize Activity dialog box, when I unchecked the Backwards Compatiblity(Appcompat) in Android Studio 2.3.1 It gave me a hint as:

If false, this activity base class will be Activity instead of AppCompatActivity

enter image description here

Generally, what do android developers prefer? enabling backwards compatibility or without it? Can anyone explain me which one is better.

like image 295
coderpc Avatar asked May 04 '17 16:05

coderpc


People also ask

What is meant by backward compatibility?

Backward compatible (also known as downward compatible or backward compatibility) refers to a hardware or software system that can successfully use interfaces and data from earlier versions of the system or with other systems.

Does Android have backwards compatibility?

Backward CompatibilityThe Android SDK is by default forward compatible but not backward compatible — this means that an app that is built with and supports a minimum SDK version of 3.0 can be installed on any device running Android versions 3.0 and upwards — but not on devices running Android versions below 3.0.

What does backward compatibility mean and why is it important?

A computer is said to be backward compatible if it can run the same softwareas the previous model of the computer. Backward compatibility is important because it eliminates the need to start over when you upgrade to a newer product.

How can Android help developers ensure backward compatibility in their apps?

In order to provide backward compatibility, developers can check at runtime the platform version and use a new API on newer versions of the platform and old API on older versions or, depending on the case, using some static libraries which offer backward compatibility.


1 Answers

Android apps can be backward-compatible without checking this checkbox.

If false, this activity base class will be Activity instead of AppCompatActivity

Android studio is letting you know that if you uncheck the "Backwards Compatability(Appcompat)" box, then you'll be including & using the library Activity instead of AppCompatActivity. For a more detailed comparison between the two, check this: Activity, AppCompatActivity, FragmentActivity, and ActionBarActivity: When to Use Which?

Generally, what do android developers prefer? enabling backwards compatibility or without it?

A comment written by "CommonsWare" explains this best:

An activity created with that checkbox checked is no more backwards compatible than is one without that checkbox checked. Checking the checkbox gives your app a particular look and feel that will retain that look and feel on some older devices; leaving the checkbox unchecked means that some aspects of your look and feel will be different on pre-Android 5.0 devices. This does not impact the core functionality of the activity, though. – CommonsWare

like image 142
Tomer Dricker Avatar answered Oct 07 '22 23:10

Tomer Dricker