On the first start Rockbox extracts libmisc.so which in fact is a zip file
holding resource files like theme bitmaps. Those can requires quite a bit of
memory.
As extended version of FS#12063 resources will now be extracted to SD card if
the file /sdcard/rockbox/rockbox-info.txt is found. This file is part of the
extracted resources and can therefore safely be used for checking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30430 a1c6a512-1295-4272-9138-f99709370657
Automatically discover the latest and greatest version of the Android SDK and
NDK by fetching it from the index.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30334 a1c6a512-1295-4272-9138-f99709370657
Making a JNI call from tick tasks is not permitted as the underlying thread
is not attached to the Java VM. This is an error and crashes in the emulator
(which has stricter JNI checks enabled by default).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30173 a1c6a512-1295-4272-9138-f99709370657
Restore pre-r29562 way of doing compatibility and adapt
it to what MediaButtonReceiver looks like. I.e. assume the new API is there,
and fall back to the old API if an exception is raised because the API isn't there.
The old API still needs to be discovered through reflection because it's removed
entirely from Honeycomb.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30165 a1c6a512-1295-4272-9138-f99709370657
* Cleanup RockboxService.java by moving the battery and
headphone monitors to separate classes and detaching their instances
* Move those monitors and RockboxTelephony.java into a new
monitors subdirectory
* Call those monitors all the same from native code by creating
the objects there
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30160 a1c6a512-1295-4272-9138-f99709370657
Android restarts services that are killed during memory pressure.
The intent parameter is null then. This caused a null pointer exception.
Now replace this null intent with one saying we've been restarted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30156 a1c6a512-1295-4272-9138-f99709370657
Update the download URLs to the most recent versions of SDK and NDK, the
previously used r09 of the SDK isn't available at that location anymore, and
differentiate between host platforms.
Note: while the script now can install the toolchain on Cygwin building for
Android on Cygwin does not work.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29993 a1c6a512-1295-4272-9138-f99709370657
It's not enterly clear what fixed it but it seems to be a combination of
increasing the buffer size and reducing the amount of code run in the callback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29961 a1c6a512-1295-4272-9138-f99709370657
This event is sent before the audio is routed back to the speaker so we
get the information about the unplugged headphone notably earlier.
Decrease the debouncing of the headphone status from 1s to 0.5s to work
around audio still getting played back via the speaker due to the pause
delay by debouncing. On Android we shouldn't need the debouncing at all.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29957 a1c6a512-1295-4272-9138-f99709370657
Listen to headphone plug events. There are currently two glitches with this:
- Android takes a while until it reports the unplug event, so there will be
some delay until playback gets paused. This is an Android limitation.
- Rockbox debounces headphone state changes for one second. Therefore playback
will shortly be routed to the speaker on unplug until Rockbox does the actual
pause.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29956 a1c6a512-1295-4272-9138-f99709370657
If the screen size specified is wider than higher specify the orientation as
landscape in AndroidManifest.xml. This usually applies to tablets where Rockbox
in portrait mode feels unnatural.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29951 a1c6a512-1295-4272-9138-f99709370657
Codec files are loaded as dynamic libraries. Instead of extracting them from
the packaged libmisc.so and therefore having them present twice on the device
put them into the apk as native libraries. Decreases the size of the installed
Rockbox by the compressed size of the codecs. Also, the extraction on first
Rockbox startup gets notably faster since it's less data to extract.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29940 a1c6a512-1295-4272-9138-f99709370657
Put the generated AndroidManifest.xml into the bin subfolder and remove it from
clean list. Avoids problems with cleaning if you're building in the android/
folder. Thanks to kugel for pointing out that people are actually doing that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29931 a1c6a512-1295-4272-9138-f99709370657
Use the source tree version as versionName string. As result the Android
Settings menu will now show that version instead of a rather unhelpful "1.0".
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29929 a1c6a512-1295-4272-9138-f99709370657
* Get rid of reflection since the lack of methods can be detected via exceptions
* Use requestAudioFocus/abandonAudioFocus APIs on 2.2+ to play nice with other music apps.
* Don't unregister the receiver on exit so we can receive media button presses (and startup the service) after idle poweroff (hopefully it's ok if mMediaButtonReceiver is garbage collected)
This should fix that Android calls the standard music app sometimes when those buttons are pressed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29865 a1c6a512-1295-4272-9138-f99709370657
Technically, the difference between stop and pause isn't important enough to keep it when no music is playing. This is how other media apps also act.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29405 a1c6a512-1295-4272-9138-f99709370657
* Re-create RockboxFramebuffer instance with every time there's a new Activity.
* Also, allow Rockbox to be started via multimedia buttons, immediately starting playback if wanted.
We don't need to keep the fb instance around when it backround, and it makes us less depending on it and the activity (less race conditions). And this is how you usually do it in Android apps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29384 a1c6a512-1295-4272-9138-f99709370657
That enables drawing from outside the apps UI thread, i.e. from within the Rockbox native thread, without needing synchronization means, and adds determinism as to when the draw happens.
It simplifies the drawing routines and adds a convinient way of detecting whether drawing should happen or not (surfaceCreated/Destroyed).
It also restores max. fps on my phone which went down drastically with the gingerbread(CM7) update.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29333 a1c6a512-1295-4272-9138-f99709370657