Android and Samsung S5 with Telephony.SECRET_CODE

862 views Asked by At

An activity in my app can only be triggrered using Telephony.SECRET_CODE. A receiver listens to this intent and starts the activity. The problem seems a bit strange. It seems Samsung S5 doesn't seem to even recognise that its a secret code I'm dialling.

Normally, as soon as you complete the secret code sequence, the dialler will clear out the code and the activity starts. This happens in simulator, Moto G, Nexus 5 and Xolo phones. But nothing happens when I do it on Samsung S5. It doesn't even clear it.

Here's what I've in my manifest:

<receiver android:name="org.example.SecretReceiver" >
    <intent-filter>
        <action android:name="android.provider.Telephony.SECRET_CODE" />
            <data
                android:host="981276345"
                android:scheme="android_secret_code" />
     </intent-filter>
</receiver>

I'm invoking it by dialling the sequence:

*#*#981276345#*#*

This works in all other phones except on Samsung S5.

Also, I have compiled using APK Level 17 so it works on my test phones. Samsung S5 details are given below:

Model Number: SM-G900F
Android Version: 4.4.2

Am I missing something?

2

There are 2 answers

0
4gus71n On

Try adding this Samsung permissions in the manifest:

<uses-permission android:name="com.sec.factory.permission.KEYSTRING"/>
<uses-permission android:name="com.sec.testingsettings.permission.KEYSTRING"/>
<uses-permission android:name="com.sec.android.app.servicemodeapp.permission.KEYSTRING"/>
0
Dvirus On

Please try this:

<receiver android:name="org.example.SecretReceiver" >
    <intent-filter>
        <action android:name="android.provider.Telephony.SECRET_CODE" />
            <data
                android:host="1234"
                android:scheme="android_secret_code" />
     </intent-filter>
</receiver>

And then open dialer and try: *#1234# It's should work..

I think maybe samsung limit their dialer for custom codes.