Shekhar Jadhav
Shekhar Jadhav

Reputation: 1035

Codename One: I want to implement Automatic reading functionality

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?

Upvotes: 2

Views: 64

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

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

Diamond wrapped that code in a cn1lib too.

Upvotes: 1

Related Questions