Difference between revisions of "Android"

Jump to navigation Jump to search
5,506 bytes added ,  03:42, 8 June 2020
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<div style="float: right; margin-left: 12px;">__TOC__</div>
<div style="float: right; margin-left: 12px;">__TOC__</div>


It's one of [[Linux distribution]]es.
'''Android''' is one of [[Linux distribution]]s.




On 7 May 2019, [[Google]] announced that the Kotlin [[programming language]] is now its preferred [[language]] for [[Android]] [[app]] [[developer]]s. Since the release of [[Android Studio]] 3.0 in October 2017, [[Kotlin]] has been included as an alternative to the standard [[Java]] compiler. The Android Kotlin [[compiler]] targets Java 6 by default, but lets the [[programmer]] choose between [[Java]] 8 to 13, for optimization.
On 7 May 2019, [[Google]] announced that the Kotlin [[programming language]] is now its preferred [[language]] for [[Android]] [[app]] [[developer]]s. Since the release of [[Android Studio]] 3.0 in October 2017, [[Kotlin]] has been included as an alternative to the standard [[Java]] compiler. The Android Kotlin [[compiler]] targets Java 6 by default, but lets the [[programmer]] choose between [[Java]] 8 to 13, for optimization.
== Full-disk encryption vs. File-based encryption ==
Devices running Android 7.0–9 support full-disk encryption. New devices running Android 10 and higher must use file-based encryption.
https://source.android.google.cn/security/encryption/full-disk
Android 7.0 and higher supports file-based encryption (FBE). File-based encryption allows different files to be encrypted with different keys that can be unlocked independently.
This article describes how to enable file-based encryption on new devices and how system applications can use the Direct Boot APIs to offer users the best, most secure experience possible.
Direct Boot
File-based encryption enables a new feature introduced in Android 7.0 called Direct Boot. Direct Boot allows encrypted devices to boot straight to the lock screen. Previously, on encrypted devices using full-disk encryption (FDE), users needed to provide credentials before any data could be accessed, preventing the phone from performing all but the most basic of operations.
https://source.android.google.cn/security/encryption/file-based
Full-disk encryption (FDE) is more secure than file-based encryption (FBE).
== Java vs. Kotlin: which language to learn? ==
Ever since [[Google]] announced [[Kotlin]] as the official [[language]] for Android development at Google IO in 2017, [[programmer]]s who want to become Android [[developer]]s have a dilemma. The big question in front of them is whether they should learn [[Kotlin]] or [[Java]].
=== Beginners in Android Development Should Start With Java ===
The first and foremost thing is that Android development is not everything. As a [[programmer]], you may be starting your career with Android development. But if you start with a well-established language like [[Java]], you become a part of the bigger Java community and market, which directly means more job opportunities.
The second and more important thing is that there is a huge community of Java programmers, which means you can find answers when you are stuck. This is very important because, as a beginner, you will face a lot of technical problems and you might not know where to head when you are stuck.
When you search Google with a Java problem, you are bound to get answers. But the same cannot be said for Kotlin, which is still a new programming language.


==How to Install Android Studio==
==How to Install Android Studio==
Line 58: Line 88:
===Run your app===
===Run your app===
https://codelabs.developers.google.com/codelabs/build-your-first-android-app/#3
https://codelabs.developers.google.com/codelabs/build-your-first-android-app/#3
== How to Create an Android App With Android Studio ==
This tutorial will teach you the basics of how to build an Android app using the Android Studio development environment. As Android devices become increasingly more common, demand for new apps will only increase. [[Android Studio]] is an easy to use (and free) development environment to learn on. It's best if one has a working knowledge of the Java [[programming language]] for this tutorial because it is the language used by Android.
There won't be much code used in this tutorial, so I will assume that you know enough [[Java]] to understand or are willing to look up what you don't know. This will take roughly 30-60 minutes, depending on how quickly you are able to download and install [[Android Studio]]. After using this tutorial to create your first Android app, you'll be well on your way to a fun new hobby or possibly even a promising career in mobile development.
https://www.instructables.com/id/How-To-Create-An-Android-App-With-Android-Studio/
=== Install Android Studio ===
=== Open a New Project ===
https://developer.android.com/training/basics/firstapp/creating-project
Open Android Studio.
In the '''Welcome to Android Studio''' window, click '''Start a new Android Studio project'''.
If you have a project already opened, select '''File > New > New Project'''.
In the '''Select a Project Template''' window, select '''Empty Activity''' and click '''Next'''.
In the '''Configure your project''' window, complete the following:
* Enter "Hello Cat" in the '''Name''' field.
* Enter "com.example.myfirstcat" in the '''Package name''' field.
* If you'd like to place the project in a different folder, change its '''Save''' location.
* Select either [[Java]] or [[Kotlin]] from the '''Language''' drop-down menu.
* Select the lowest version of Android your app will support in the '''Minimum SDK''' field.
* If your app will require legacy library support, mark the '''Use legacy android.support libraries''' checkbox.
* Leave the other options as they are.
Click '''Finish'''.
After some processing time, the Android Studio main window appears.
=== Edit the Welcome Message in the Main Activity ===
Navigate to the activity_main.xml tab if it is not already open.
Make sure that the Design tab (on the upper right side of the window) is open on the activity_main.xml display.
In the project file system on the left side of the window, open the values folder.
In the values folder, double-click the strings.xml file.
In this file, find the line "Hello Cat".
<resources>
    <string name="app_name">Hello Cat</string>
</resources>
After the "Hello Cat" message, add "Hello girls! Welcome to my kingdom!"
<resources>
    <string name="app_name">Hello Cat</string>
   
    <string name="hello_girls">Hello girls! Welcome to my kingdom!</string>
    <string name="action_settings">Settings</string>
</resources>
Navigate back to the activity_main.xml tab.
Make sure that your centered text now reads "Hello girls! Welcome to my kingdom!"
=== Add a Button to the Main Activity ===


==See also==
==See also==
Line 66: Line 173:
:* [[Kotlin]] ([[Kotlin (programming language)]])
:* [[Kotlin]] ([[Kotlin (programming language)]])
* [[Python]]
* [[Python]]
:* [[Django for Beginners 3]]
* [[Machine learning]]
* [[Machine learning]]
:* [[Statistics]]
:* [[Statistics]]
Line 75: Line 183:
* [[Smartphone]]
* [[Smartphone]]
* [[Tablet computer]]
* [[Tablet computer]]
* [[Linux]]
:* [[Ubuntu]]
* [[GhostBSD]]




9

edits

Navigation menu