[Xposed Framework Modules] tryptophane:
Various mods for the stock camera app of Sony Xperia devices.

For now, this module consists of 8 mods:

Let the user choose which gallery app gets opened by the camera

Use date-time naming-scheme

Force photo mode on start

Force manual mode on start

Keep Geo-Tags setting ON

Enable location setting in system on start

Choose location mode setting

Restore location setting in system on exit

Mod geo-tag icon

This module is meant to grow, therefore the rather generic name. Ideas are welcome!

Note: Tested on my Z1 Compact. Chances are good that it works well with other Xperia devices, as far as they have the same camera app. I would appreciate your feedback :)

Note 2: This module is for Lollipop on Xperia Z* devices only!

MOD #1: Let the user choose which gallery app gets opened by the camera

In the latest Lollipop releases for the Xperia Z1 Compact and other Xperia Z devices, it is not possible anymore to choose which gallery app is used when you tap on the small picture thumbnail in the camera UI. It will always open the Sony Album app. But some people, like me, dislike the Sony Album app and prefer to use alternatives like Quickpic or others.

With this mod, the camera app lets you choose again which gallery app to use when you tap on the thumbnail. Even better, it lets you choose different apps for normal JPEG photos and some special formats, like timeshift pictures or sound photos. For those kind of pictures, it is still advisable to use the Album app which supports the features of those formats (like playing sound on a picture).

The mod has been implemented to work in the following camera modes (each of them has a separate implementation for launching the gallery and had to be hacked separatedly:

Superior Auto

Manual

Background Defocus

AR-Effect

Panorama

Creative Effect

Sound Photo

Timeshift burst

In other camera modes, the camera will possibly still always use the Album app.

If it does not work and you do not get asked which app to use, try to clear the defaults of the gallery app that gets opened by default!

MOD #2: Use date-time naming-scheme

This will save pictures and movies according to a date-time-with-milliseconds naming scheme:

for pictures: DSC_yyyyMMdd_HHmmss_SSS.JPG (example: DSC_20151230_133825_423.JPG)

for movies: DSC_yyyyMMdd_HHmmss_SSS.JPG (example: MOV_20151230_134232_922.mp4)

It will apply to the modes Superior Auto, Manual and Creative Effects

MOD #3: Force photo mode on start

In manual mode, the camera will always start in photo mode, even if the last mode used was video.

This mod is disabled by default. Go to settings page to enable it.

MOD #4: Force manual mode on start

The camera will always start in manual mode, when started from menu, shortcut or history. This mod does not apply when the camera is started from the camera button or lockscreen. In this case, the default "Superior Auto" mode will be started.

MOD #5: Keep Geo-Tags setting ON

This mod prevents a very annoying behavior of the stock camera app. Whenever you switch the camera to another mode than superior auto or manual, it will set the Geo-Tags setting to OFF, if GPS has been disallowed in the system-wide android settings. It will stay OFF in all camera modes until you set it to ON manually again, even if GPS has been allowed again in the system settings. The result of this behavior is that most of the pictures I made with my phone lack the location tag, although I never disabled the geo tags intentionally in the camera settings.

This mod prevents this behavior, the Geo-Tags setting will stay set to ON until you deliberately disable it. Geo-Tag setting can be switched on or off independantly from the location settings in android.

MOD #6: Enable location setting in system on start

This will enable location in the android system settings on camera start/resume, to make sure that geo tags can always get recorded (see also MOD #8 to restore the previous location settings on camera exit.

This mod applies only to the camera modes "superior auto" and "manual". When starting other modes, the location setting will stay untouched. In combination with MOD #8, this means: if GPS gets activated by starting one of this 2 modes and MOD #8 is activated, switching to another mode will deactivate GPS again. To record geo-tags in the other modes, you will still have to activate GPS manually in the system settings if MOD #8 is activated. This restriction is due to technical limitations due to the fact that each camera mode is an independent app, and these apps cannot communicate without any time lag. But this would be necessary to make this mod work reliably across different modes.

MOD #7: Choose location mode setting

This mod enables to choose the mode for acquiring location to be set in system. It can be either GPS, networks or both.

This Xposed module will never disable a mode that was activated prior to camera start! E.g., if before camera start location was enabled in system and set to GPS, and you choose to enable location based on networks in this module, it will set the location mode to GPS and networks on camera start.

MOD #8: Restore location setting in system on exit

When exiting the camera, this mod will restore the location settings in system to their state before camera start. It applies only to the modes "superior auto" and "manual".

MOD #9: Mod geo-tag icon

Show a blue geo-tag icon when location is fixed by networks and a white one for GPS-fix.

Credits:

Many thanks to:

rovo89 for the magnific Xposed framework.

venkat kamesh for a tutorial on how to hack the camera UI on a smali basis, which led me to make my first steps in reverse engineering of android APKs.

Download:

Xposed Module Repository

License

This module is released under the Apache License Version 2.0

Here you can say Thank You if you like my work :) _____

|

V​