dimanche 24 mai 2015

How to react to camera button being pressed on Xperia Z3

Is it possible at all to react to the Xperia Z3's hardware camera button? I've tried android.intent.action.CAMERA_BUTTON:

<activity
    android:name=".MainActivity"
    android:label="@string/app_name"
    android:screenOrientation="landscape">
    <intent-filter android:priority="1000">
        <action android:name="android.intent.action.CAMERA_BUTTON" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>

But still the built-in camera app is opened.

Looking into the Logcat, the button does indeed not fire a CAMERA_BUTTON intent but the specific one for the vendor app. Did anyone succeed with outsmarting the device?

Aucun commentaire:

Enregistrer un commentaire