Android Question SMS app on KitKat not a default option

lymey

Active Member
Licensed User
Longtime User
Hi!
I have an app that uses the SMS interceptor to receive SMs, and PhoneSMS to send SMS. It has been working fine Android 2.2 > 4.1. It still works on 4.4.2 BUT, it does not show up on the Default SMS messenger options, so I cannot set it to be the default, and therefore the default messenger gets the message as well. The SMSInterceptor runs in a service (messageinterceptor) and the priority is set to 9999.
B4X:
xxxxsmsint.Initialize2("smsint", 9999)

What do I need to do to make sure that KitKat recognizes my SMS app as an option for default messenger?
I am guessing it might be the manifest?
Any ideas would be greatly appreciated.

The current permissions in the manifest look like:
B4X:
    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="19"/>
    <supports-screens android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:anyDensity="true"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.RECEIVE_SMS"/>
    <uses-permission android:name="android.permission.CALL_PHONE"/>
    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>
    <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
    <uses-permission android:name="android.permission.SEND_SMS"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <application
        android:icon="@drawable/icon"
        android:label="xxxx-SMS"
        android:theme="@android:style/Theme.Holo.Light">
        <activity
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTop"
            android:name=".main"
            android:label="xxxx-SMS"
            android:screenOrientation="unspecified">
            <intent-filter>
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
           
        </activity>
        <activity
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTop"
            android:name=".usersettings"
            android:label="xxxx-SMS"
            android:screenOrientation="unspecified">
        </activity>
        <service android:name=".messageinterceptor">
        </service>
        <receiver android:name=".messageinterceptor$messageinterceptor_BR">
            <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>
 

lymey

Active Member
Licensed User
Longtime User
Basically the app allows SMS messages to be sent and received without anyone but the sender or recipient able to receive them without an id or password, and there is no trace left on the device messenger.
If the app isn't the default then the device default app will pick up the SMS messages too, and that defeats the point of the 'privacy' app.
 
Last edited:
Upvote 0

lymey

Active Member
Licensed User
Longtime User
What are you trying to implement? Who is the end user?

Starting from Android 4.4 the user will only set your app to be the default app if it is a real replacement for the messaging app.

This is a problem too for apps that intercept a task specific SMS message, for example receiving remote device status updates, GPS data, encrypted and confidential data etc.

Without the ability to 'privately' intercept SMS all of these messages and data are exposed to the default device app and not just to the app that uses the messages for a specific purpose.
 
Upvote 0

lymey

Active Member
Licensed User
Longtime User
This is true however only Google can change it...
According to Google it is possible to prepare an app capable of being the default: http://android-developers.blogspot.co.uk/2013/10/getting-your-sms-apps-ready-for-kitkat.html

[/URL]

Is it possible using B4A to meet the requirements of a KitKat default messaging app?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It depends on what you mean with meeting the requirements. It is simple to create an app that can function as the default messaging app. This is explained in the link I posted. However if you want to create a true messaging app then you need to implement something in the level of hangouts. Otherwise the user will not choose your app as the default messaging app.
 
Upvote 0

lymey

Active Member
Licensed User
Longtime User
Ok, For a basic SMS app with the same functionality as before basically add additional services for intents that Google requires - dummy services that have no functionality ?

Is B4a going to be updated for KitKat with functionality/tools to allow the construction of a true messenger app or is it doable now?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Is B4a going to be updated for KitKat with functionality/tools to allow the construction of a true messenger app or is it doable now?
Most or all of the features required to build a messaging app are already supported. If you are missing any specific feature then please post it in the wishlist forum.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…