Codename One: I want to implement Automatic reading functionality

Viewed 58

I want to implement Automatic OTP reading functionality in My project which I have built using Codename One.

I have implemented this functionality in core Android and I want to implement it using Native Android code in Codename one.

Where do I add below Receiver code in codename one?

<receiver android:name="com.example.IncomingSms">
    <intent-filter>
        <action android:name="android.provider.Telephony.SMS_RECEIVED"/>
    </intent-filter>
</receiver>

Where do I add "IncomingSms" class in codename one native code?

How do I call this native methods in main codename one code while receiving message?

1 Answers

I recently wrote a blog post about intercepting incoming SMS messages.

Diamond wrapped that code in a cn1lib too.

Related