1
0
mirror of https://github.com/danog/termux-api.git synced 2024-11-30 04:19:20 +01:00
Commit Graph

154 Commits

Author SHA1 Message Date
Fredrik Fornwall
de8d68a64e termux-wifi-scaninfo needs Location enabled
Due to https://issuetracker.google.com/issues/37060483:

        WifiManager#getScanResults() returns an empty array list
        if GPS is turned off

the user needs to enable Location on the device for termux-wifi-scaninfo
to work. So show "Location needs to be enabled on the device" if necessary.
2018-06-06 01:09:27 +02:00
David Kramer
0ead304e4b Add CallLogAPI (#170) 2018-06-06 00:20:40 +02:00
Fredrik Fornwall
9bf693380d Show which permissions are required 2018-06-06 00:20:09 +02:00
Auxilus
c179e18d99 Update TermuxApiPermissionActivity.java (#109) 2018-06-06 00:10:19 +02:00
David Kramer
05ed7b750b Fix possible crash in SensorAPI due to null command (#171) 2018-06-06 00:06:11 +02:00
Cem
30b21b2fe2 Added 'data_enabled' and 'sim_subscriber_id' fields to 'termux-telephony-deviceinfo' (#175) 2018-06-06 00:04:36 +02:00
Fredrik Fornwall
298ebe74d1 disableWrapperSourceDistributionNotification=true 2018-06-05 23:59:55 +02:00
Fredrik Fornwall
010945ea37 Update gradle configuration 2018-06-05 23:59:31 +02:00
Cem
4de411b720 Fixed notifications not displaying on Oreo (#173) 2018-06-05 23:14:11 +02:00
Fredrik Fornwall
50230df060 Bump version from 0.20 to 0.21 2018-04-12 01:38:29 +02:00
tomty89
6b5122c2ba MediaPlayerAPI: Some more minor improvements (#160)
* MediaPlayerAPI: revert commit 299d557

The error message won't be displayed anyway:

$ touch empty
$ dd if=/dev/urandom of=random count=2048
2048+0 records in
2048+0 records out
1048576 bytes (1.0MB) copied, 0.190185 seconds, 5.3MB/s
$ termux-media-player play empty

setDataSourceFD failed.: status=0x80000000
$ termux-media-player play random

Prepare failed.: status=0x1
$

* MediaPlayerAPI: catch NullPointerException for -a play

* MediaPlayerAPI: use getCanonicalPath() instead

* MediaPlayerAPI: use proper values for setVolume()

* MediaPlayerAPI: fix play and stop from pause

* MediaPlayerAPI: add trackName for info and resume

Suggested by Auxilus (#162)
2018-04-12 01:36:41 +02:00
David Kramer
485491c685 Remove implemented features from ideas in readme / fix typo (#163) 2018-04-12 01:21:28 +02:00
David Kramer
fa9373ab1e Fix possible crash in NotificationAPI from invalid LED color value (#164) 2018-04-12 01:21:06 +02:00
Fredrik Fornwall
19acd1d54a Bump version from 0.19 to 0.20 2018-04-09 01:12:53 +02:00
David Kramer
efcafdf579 Fixes incorrect error message being displayed when playing track / (#157)
possible crash when playing another track after other finished
2018-04-09 01:04:45 +02:00
David Kramer
0aeb960680 Add MicRecorderAPI (#158) 2018-04-09 01:04:37 +02:00
David Kramer
e7fa1d2498 Add WallpaperAPI 2018-04-09 01:03:10 +02:00
Fredrik Fornwall
56b5e9a935 Bump version from 0.18 to 0.19 2018-04-07 01:54:10 +02:00
landfillbaby
d4660a3ce9 MediaPlayerApi playHandler: prepare synchronously, don't always print failure
the isPlaying() call was completing before the prepareAsync() call, always returning "Failed to play: "
2018-04-07 01:53:26 +02:00
Fredrik Fornwall
a5b2a01d96 Bump version from 0.17 to 0.18 2018-04-07 00:42:31 +02:00
Tom Yan
34c6841a05 AudioAPI: updates for AudioTrack methods
There are several changes in the commit:

1. Use instance methods to get sample rate and buffer size info
on Android N or above only instead of Android M, since both
AudioAttributes.FLAG_LOW_LATENCY (256) and the implicitly used
AudioFormat.SAMPLE_RATE_UNSPECIFIED (0) are available only since
API 24 (N).

2. Use setPerformanceMode() on Android O, as FLAG_LOW_LATENCY is
deprecated since API 26 (O).

3. Create AudioTrack instance of both the fast (LOW_LATENCY) and
deep buffer (POWER_SAVING) mixer path. The two paths can be using
different subdevices on different rate and buffer size (or same
subdevice on same rate but different buffer size). For example on
my phone:

AUDIOTRACK_SAMPLE_RATE: 192000
AUDIOTRACK_BUFFER_SIZE_IN_FRAMES: 23046
AUDIOTRACK_SAMPLE_RATE_LOW_LATENCY: 48000
AUDIOTRACK_BUFFER_SIZE_IN_FRAMES_LOW_LATENCY: 192

4. Get info on sample rate with the getNativeOutputSampleRate()
static method (static in Java's sense; the value is still sink-
based) on builds older than N only. The rate appears to be of the
fast (LOW_LATENCY) mixer path if it is available.

5. A note on the static method getMinBufferSize(). The reason it
is not used even for older devices is, it returns buffer size info
of the deep buffer (POWER_SAVING) mixer path, while NOSR is the
rate of the fast (LOW_LATENCY) mixer path, so the value we can get
with it is not always sensical.
2018-04-07 00:41:37 +02:00
Tom Yan
299d55789b MediaPlayerAPI: check whether playback has been successfully started 2018-04-07 00:38:55 +02:00
Tom Yan
7bdd53008a MediaPlayerAPI: eliminate pointless toUpperCase()
Fixes #154.
2018-04-07 00:38:55 +02:00
Tom Yan
9c104aac36 MediaPlayerAPI: prevent NullPointerException
Fixes #154.
2018-04-07 00:38:55 +02:00
Tom Yan
1be62a5c91 MediaPlayerAPI: remove extension pattern check
There are way more possibilities and extension doesn't guarantee
anything about the file.
2018-04-07 00:38:55 +02:00
Fredrik Fornwall
35ba761e3a Add google() too allprojects.repositories 2018-04-02 01:52:50 +02:00
Fredrik Fornwall
94f4239c26 Specify google() before jcenter() 2018-04-02 01:42:56 +02:00
Fredrik Fornwall
746f2b07ce Update gitignore for Android Studio 3.1 2018-04-02 01:38:10 +02:00
David Kramer
89e2b1ed95 Add MediaPlayerAPI (#146) 2018-04-02 01:27:13 +02:00
Fredrik Fornwall
bf9577e23a Bump version to 0.17 2018-04-02 00:59:10 +02:00
Fredrik Fornwall
b7cc2a3dd1 Update gradle configuration 2018-04-02 00:58:32 +02:00
Fredrik Fornwall
efc06c4a32 Remove unused import 2018-04-02 00:55:13 +02:00
David Kramer
eab70c318f Add SensorAPI (#147) 2018-04-02 00:51:14 +02:00
tomty89
11b84d9f9c AudioAPI: fix build-time error (#145) 2018-04-02 00:49:35 +02:00
Auxilus
dd5b978263 Add more ideas (#135) 2018-03-23 00:42:19 +01:00
tomty89
9552c418ba AudioAPI: avoid redundant code (#134) 2018-03-23 00:41:42 +01:00
David Kramer
91b8ed4249 Adds TorchAPI implementation (#137) 2018-03-23 00:22:43 +01:00
Fredrik Fornwall
adfc184011 Fix typo 2018-02-05 01:03:35 +01:00
Fredrik Fornwall
46201ae981 Bump version to 0.16 2018-02-05 01:01:03 +01:00
Fredrik Fornwall
1f3eee8e2e Format code 2018-02-05 00:53:01 +01:00
its-pointless
7d54c4d629 Update Audiotrack API (#129) 2018-02-05 00:46:01 +01:00
Ian Brunelli
32c2781664 Add MediaScannerAPI (#123) 2018-02-05 00:41:27 +01:00
Fredrik Fornwall
720daae952 Update build tools version 2018-02-01 22:23:12 +01:00
its-pointless
a544de8c1b gets info for fast_mixer (#126) 2018-02-01 22:22:07 +01:00
Fredrik Fornwall
d57169a97a Update gradle configuration 2017-11-26 23:27:07 +01:00
Fredrik Fornwall
bace70c37d Update gradle configuration 2017-10-31 19:26:33 +01:00
Auxilus
b3c0918e5e Fix termux-api.c link (#115) 2017-10-22 21:03:47 +02:00
Fredrik Fornwall
21d6b973f9 Update gradle configuration 2017-09-24 22:54:15 +02:00
Kashav Madan
b7bfe01b1a Fix link to termux-api-package (#103) 2017-08-08 14:02:44 +02:00
Fredrik Fornwall
e4bf7b94c0 Bump version to 0.15 2017-04-09 23:27:03 +02:00