@@ -3,12 +3,14 @@ Title: Adding Android as a supported platform
3
3
Author: Malcolm Smith <
[email protected] >
4
4
Sponsor: Petr Viktorin <
[email protected] >
5
5
Discussions-To: https://discuss.python.org/t/pep-738-adding-android-as-a-supported-platform/40975
6
- Status: Accepted
6
+ Status: Final
7
7
Type: Standards Track
8
8
Created: 12-Dec-2023
9
9
Python-Version: 3.13
10
10
Resolution: https://discuss.python.org/t/pep-738-adding-android-as-a-supported-platform/40975/23
11
11
12
+ .. canonical-doc :: :ref:`python:using-android`
13
+
12
14
13
15
Abstract
14
16
========
@@ -289,8 +291,6 @@ namedtuple containing the following:
289
291
* ``release `` - Android version of the device, as a string (e.g. ``"14" ``)
290
292
* ``api_level `` - :ref: `API level <738-os-versions >` of the device, as an
291
293
integer (e.g. ``34 ``)
292
- * ``min_api_level `` - Minimum API level this build of Python can run on, as
293
- an integer (e.g. ``23 ``). This is the same as ``sys.getandroidapilevel ``.
294
294
* ``manufacturer `` - `manufacturer
295
295
<https://developer.android.com/reference/android/os/Build#MANUFACTURER> `__ of
296
296
the device, as a string (e.g. ``"Google" ``)
@@ -300,6 +300,8 @@ namedtuple containing the following:
300
300
* ``device `` - `device name
301
301
<https://developer.android.com/reference/android/os/Build#DEVICE> `__ of the
302
302
device, as a string (e.g. ``"panther" ``)
303
+ * ``is_emulator `` - ``True `` if the device is an emulator; ``False `` if it’s a
304
+ physical device.
303
305
304
306
Which one of ``model `` and ``device `` is more likely to be unique, and which one
305
307
is more likely to resemble the marketing name, varies between different
@@ -437,6 +439,20 @@ example of a test suite that is executed on the Android emulator using GitHub
437
439
Actions.
438
440
439
441
442
+ Rejected Ideas
443
+ ==============
444
+
445
+ The following changes were made to the original specification of
446
+ ``platform.android_ver() ``:
447
+
448
+ * The ``min_api_level `` field was removed, because unlike all the other fields,
449
+ it isn't a property of the current device. This information is still available
450
+ from the pre-existing function ``sys.getandroidapilevel() ``.
451
+
452
+ * The ``is_emulator `` field was added, since experience during testing showed
453
+ that some issues were emulator-specific.
454
+
455
+
440
456
Copyright
441
457
=========
442
458
0 commit comments