Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: How can I receive SMS ?


This question is answered.


Permlink Replies: 14 - Last Post: Sep 15, 2017 3:20 PM Last Post By: murat kerimoglu
murat kerimoglu

Posts: 59
Registered: 8/14/17
How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 11, 2017 7:35 PM
Dear My Friends, Hello,

How can I receive SMS ?

I'm using this code:

uses
  Androidapi.JNI.JavaTypes,
  Androidapi.JNI.Telephony,
  Androidapi.JNIBridge,
  Androidapi.JNI.GraphicsContentViewText,
  Androidapi.Helpers;
 
...
 
type
JTelephonySmsIntentsClass = interface(IJavaClass)
['{73FFA042-DAE3-497F-B9D4-B7F1B178E941}']
 
{class} function getMessagesFromIntent(intent: JIntent): TJavaArray<JSmsMessage>; cdecl;
 
{class} function _GetSMS_RECEIVED_ACTION: JString; cdecl;
{class} property SMS_RECEIVED_ACTION: JString read _GetSMS_RECEIVED_ACTION; end;
 
[JavaSignature('android/provider/Telephony/Sms/Intents')]
  JTelephonySmsIntents = interface(IJavaInstance)
['{42798E28-0E3A-4287-8EE9-606BB9D311B5}'] end;
 
TJTelephonySmsIntents = class(TJavaGenericImport<JTelephonySmsIntentsClass, JTelephonySmsIntents>) end;
 
...
 
procedure TForm1.BroadcastReceiverReceive(Context: JContext; Intent: JIntent);
var
i: Integer;
msgs: TJavaArray<JSmsMessage>;
msg : JSmsMessage;
phonenumber, body : string;
begin
 
  if Intent.getAction.compareTo(TJTelephonySmsIntents.JavaClass.SMS_RECEIVED_ACTION) = 0 then
  begin
 
  msgs := TJTelephonySmsIntents.JavaClass.getMessagesFromIntent(Intent);
  for i := 0 to msgs.Length - 1 do
        begin
        msg := msgs[i];
        phonenumber := JStringToString(msg.getOriginatingAddress);
        body := JStringToString(msg.getDisplayMessageBody);
        Memo1.Lines.Add(phonenumber + ' : ' + body);
        end;
 
  end;
 
end;


But there isn't any result for TMemo.

There isn't any error in my code but

JTelephonySmsIntentsClass(IJavaClass) - error
JTelephonySmsIntents(IJavaInstance) - error
TJTelephonySmsIntents = class(TJavaGenericImport<JTelephonySmsIntentsClass, JTelephonySmsIntents>) - ok

in Structure Window

I'm using Delphi 10.2 Tokyo - Android Platform.

Thanks, Greetings.
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 11, 2017 8:31 PM   in response to: murat kerimoglu in response to: murat kerimoglu
murat kerimoglu wrote:

How can I receive SMS ?

In order to receive SMS messages in your app, you need to create Java code for the receiver, and include the class of
the receiver in the manifest. This is an article about it using Java code entirely:

https://mobiforge.com/design-development/sms-messaging-android

You'll likely be interested in the 2nd half, about receiving SMS messages. As per my first statement, you would need to
code a receiver in Java. If you want it to communicate with your Delphi code, you could use the LocalBroadcastManager
in the Java code to send the intent, e.g:

import android.support.v4.content.LocalBroadcastManager
 
...
  
  // context and intent are passed into the onReceive method of the BroadcastReceiver descendant
  LocalBroadcastManager.getInstance(context).sendBroadcast(intent); 


There's an example of how to use local broadcasts in Delphi in my Kastri Free library, in these units:

https://github.com/DelphiWorlds/KastriFree/blob/master/API/DW.Androidapi.JNI.LocalBroadcastManager.pas
https://github.com/DelphiWorlds/KastriFree/blob/master/Features/Firebase/DW.Firebase.Messaging.Android.pas

This may at least give you a start; a complete answer would require much more time.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
murat kerimoglu

Posts: 59
Registered: 8/14/17
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 11, 2017 9:47 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
murat kerimoglu wrote:

How can I receive SMS ?

In order to receive SMS messages in your app, you need to create Java code for the receiver, and include the class of
the receiver in the manifest. This is an article about it using Java code entirely:

https://mobiforge.com/design-development/sms-messaging-android

You'll likely be interested in the 2nd half, about receiving SMS messages. As per my first statement, you would need to
code a receiver in Java. If you want it to communicate with your Delphi code, you could use the LocalBroadcastManager
in the Java code to send the intent, e.g:

import android.support.v4.content.LocalBroadcastManager
 
...
  
  // context and intent are passed into the onReceive method of the BroadcastReceiver descendant
  LocalBroadcastManager.getInstance(context).sendBroadcast(intent); 


There's an example of how to use local broadcasts in Delphi in my Kastri Free library, in these units:

https://github.com/DelphiWorlds/KastriFree/blob/master/API/DW.Androidapi.JNI.LocalBroadcastManager.pas
https://github.com/DelphiWorlds/KastriFree/blob/master/Features/Firebase/DW.Firebase.Messaging.Android.pas

This may at least give you a start; a complete answer would require much more time.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Dear Dave Nottage,

Very thanks for your important comments about this matter.

Greetings.
murat kerimoglu

Posts: 59
Registered: 8/14/17
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2017 6:27 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
murat kerimoglu wrote:

How can I receive SMS ?

In order to receive SMS messages in your app, you need to create Java code for the receiver, and include the class of
the receiver in the manifest. This is an article about it using Java code entirely:

https://mobiforge.com/design-development/sms-messaging-android

You'll likely be interested in the 2nd half, about receiving SMS messages. As per my first statement, you would need to
code a receiver in Java. If you want it to communicate with your Delphi code, you could use the LocalBroadcastManager
in the Java code to send the intent, e.g:

import android.support.v4.content.LocalBroadcastManager
 
...
  
  // context and intent are passed into the onReceive method of the BroadcastReceiver descendant
  LocalBroadcastManager.getInstance(context).sendBroadcast(intent); 


There's an example of how to use local broadcasts in Delphi in my Kastri Free library, in these units:

https://github.com/DelphiWorlds/KastriFree/blob/master/API/DW.Androidapi.JNI.LocalBroadcastManager.pas
https://github.com/DelphiWorlds/KastriFree/blob/master/Features/Firebase/DW.Firebase.Messaging.Android.pas

This may at least give you a start; a complete answer would require much more time.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Dear Dave Nottage, Hello,

Also I found this page with regard to (android.support.v4.content.LocalBroadcastManager)

http://www.gesource.jp/weblog/?p=7270

I will use your (DW.Androidapi.JNI.LocalBroadcastManager.pas) for (Androidapi.JNI.LocalBroadcastManager)

Greetings.

Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2017 9:01 AM   in response to: murat kerimoglu in response to: murat kerimoglu
Am 12.09.2017 um 04:35 schrieb murat kerimoglu:

[snip]


There isn't any error in my code but

JTelephonySmsIntentsClass(IJavaClass) - error
JTelephonySmsIntents(IJavaInstance) - error
TJTelephonySmsIntents = class(TJavaGenericImport<JTelephonySmsIntentsClass, JTelephonySmsIntents>) - ok

in Structure Window

About the errors shown in structure window: Ide Insight which also
provides those red lines below wrong code uses its own parser which is
different than the compiler one's.

But that additional parser (somehow inherited from somewhere) is often
not 100% current and it also has some bugs which leads to not finding
some stuff. EMBT knows this, but it's not of too high priority.
Sometimes they add some of the new features and thus reduce the amount
of false positives a little bit.

Greetings

Markus
murat kerimoglu

Posts: 59
Registered: 8/14/17
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2017 12:58 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:
Am 12.09.2017 um 04:35 schrieb murat kerimoglu:

[snip]


There isn't any error in my code but

JTelephonySmsIntentsClass(IJavaClass) - error
JTelephonySmsIntents(IJavaInstance) - error
TJTelephonySmsIntents = class(TJavaGenericImport<JTelephonySmsIntentsClass, JTelephonySmsIntents>) - ok

in Structure Window

About the errors shown in structure window: Ide Insight which also
provides those red lines below wrong code uses its own parser which is
different than the compiler one's.

But that additional parser (somehow inherited from somewhere) is often
not 100% current and it also has some bugs which leads to not finding
some stuff. EMBT knows this, but it's not of too high priority.
Sometimes they add some of the new features and thus reduce the amount
of false positives a little bit.

Greetings

Markus

Dear Markus Humm, Hello,

Very thanks for your comment.

Greetings.
murat kerimoglu

Posts: 59
Registered: 8/14/17
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 5:01 PM   in response to: murat kerimoglu in response to: murat kerimoglu
murat kerimoglu wrote:
How can I receive SMS ?

Dear My Friends,

I worked somethings on LocalBroadcastManager matter.

And I'm continuing on this matter for to receive sms now.

But, how can i edit my codes for to receive sms ?

Greetings.

My codes:

Local Service Unit:

unit servsUnit1;
 
interface
 
uses
  System.SysUtils,
  System.Classes,
  System.Android.Service,
  System.Generics.Collections,
  AndroidApi.JNI.GraphicsContentViewText,
  Androidapi.JNI.Os,
  Androidapi.JNI.JavaTypes,
  Androidapi.JNIBridge,
  Androidapi.Helpers,
  Androidapi.JNI.App;
 
type
 
  JLocalBroadcastManager = interface;
 
  JLocalBroadcastManagerClass = interface(JObjectClass)
    ['{5CCF81B2-E170-47C4-873E-32E644085880}']
    {class} function getInstance(context: JContext): JLocalBroadcastManager; cdecl;
  end;
 
  [JavaSignature('android/support/v4/content/LocalBroadcastManager')]
  JLocalBroadcastManager = interface(JObject)
    ['{B5D9B2DA-E150-4CC5-BBDA-58FCD42C6C1E}']
    procedure registerReceiver(receiver: JBroadcastReceiver; filter: JIntentFilter); cdecl;
    function sendBroadcast(intent: JIntent): Boolean; cdecl;
    procedure sendBroadcastSync(intent: JIntent); cdecl;
    procedure unregisterReceiver(receiver: JBroadcastReceiver); cdecl;
  end;
  TJLocalBroadcastManager = class(TJavaGenericImport<JLocalBroadcastManagerClass, JLocalBroadcastManager>) end;
 
  TDM = class(TAndroidService) end;
 
  TAndroidServiceDM = class(TAndroidService)
  procedure AndroidServiceCreate(Sender: TObject);
  procedure AndroidServiceDestroy(Sender: TObject);
  function AndroidServiceStartCommand(const Sender: TObject; const Intent: JIntent; Flags, StartId: Integer): Integer;
  
  private
    { Private declarations }
    FThreads: TObjectList<TThread>;
  public
    { Public declarations }
  end;
 
var
  DM: TDM;
 
implementation
 
{%CLASSGROUP 'FMX.Controls.TControl'}
 
{$R *.dfm}
 
procedure TAndroidServiceDM.AndroidServiceCreate(Sender: TObject);
begin
  if JavaService <> nil then
  begin
    FThreads := TObjectList<TThread>.Create;
  end;
end;
 
procedure TAndroidServiceDM.AndroidServiceDestroy(Sender: TObject);
begin
  FThreads.Free;
end;
 
function TAndroidServiceDM.AndroidServiceStartCommand(const Sender: TObject;
  const Intent: JIntent; Flags, StartId: Integer): Integer;
var
  LThread: TThread;
begin
  LThread := TThread.CreateAnonymousThread(
    procedure
    begin
      Sleep(2000);
      TJLocalBroadcastManager.JavaClass.getInstance(JavaService)
        .sendBroadcast(TJIntent.JavaClass.init(StringToJString('ACTION_NAME')));
      JavaService.stopSelf(StartId);
    end);
  LThread.FreeOnTerminate := False;
  FThreads.Add(LThread);
  LThread.Start;
 
  Result := TJService.JavaClass.START_STICKY;
end;
 
end.


Application Unit:

unit newdenservsUnit1;
 
interface
 
uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
  FMX.Controls.Presentation, FMX.StdCtrls,
  System.Android.Service,
  Androidapi.JNI.JavaTypes,
  Androidapi.JNI.Telephony,
  Androidapi.JNIBridge,
  Androidapi.JNI.GraphicsContentViewText,
  Androidapi.Helpers,
  Androidapi.JNI.Embarcadero;
 
type
 
  JLocalBroadcastManager = interface;
 
  JLocalBroadcastManagerClass = interface(JObjectClass)
    ['{5CCF81B2-E170-47C4-873E-32E644085880}']
    {class} function getInstance(context: JContext): JLocalBroadcastManager; cdecl;
  end;
 
  [JavaSignature('android/support/v4/content/LocalBroadcastManager')]
  JLocalBroadcastManager = interface(JObject)
    ['{B5D9B2DA-E150-4CC5-BBDA-58FCD42C6C1E}']
    procedure registerReceiver(receiver: JBroadcastReceiver; filter: JIntentFilter); cdecl;
    function sendBroadcast(intent: JIntent): Boolean; cdecl;
    procedure sendBroadcastSync(intent: JIntent); cdecl;
    procedure unregisterReceiver(receiver: JBroadcastReceiver); cdecl;
  end;
  TJLocalBroadcastManager = class(TJavaGenericImport<JLocalBroadcastManagerClass, JLocalBroadcastManager>) end;
 
  TMyReceiverListener = class(TJavaLocal, JFMXBroadcastReceiverListener)
  public
    constructor Create;
    procedure onReceive(context: JContext; intent: JIntent); cdecl;
  end;
 
 
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
 
  private
    { Private declarations }
    FMyListener: TMyReceiverListener;
    FBroadcastReceiver: JFMXBroadcastReceiver;
    FIntentFilter: JIntentFilter;
    FLocalBroadcastManager: JLocalBroadcastManager;
  public
    { Public declarations }
  end;
 
const
SERVICE_NAME ='servs' ;
 
var
  Form1: TForm1;
 
implementation
 
{$R *.fmx}
 
constructor TMyReceiverListener.Create;
begin
inherited Create;
end;
 
procedure TMyReceiverListener.onReceive(context: JContext; intent: JIntent);
begin
  Log.d('TMyReceiverListener.onReceive:' + JStringToString(intent.getAction));
end;
 
procedure TForm1.Button1Click(Sender: TObject);
begin
TLocalServiceConnection.StartService(SERVICE_NAME);
end;
 
procedure TForm1.FormCreate(Sender: TObject);
begin
  FLocalBroadcastManager := TJLocalBroadcastManager.JavaClass.getInstance
  (TAndroidHelper.Activity.getApplicationContext);
  FMyListener := TMyReceiverListener.Create;
  FBroadcastReceiver := TJFMXBroadcastReceiver.JavaClass.init(FMyListener);
  FIntentFilter := TJIntentFilter.Create;
  FIntentFilter.addAction(StringToJString('ACTION_NAME'));
  FLocalBroadcastManager.registerReceiver(FBroadcastReceiver, FIntentFilter);
end;
 
procedure TForm1.FormDestroy(Sender: TObject);
begin
  FLocalBroadcastManager.unregisterReceiver(FBroadcastReceiver);
  FBroadcastReceiver := nil;
  FMyListener.Free;
  FMyListener := nil;
  FIntentFilter := nil;
end;
 
end.
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 6:41 PM   in response to: murat kerimoglu in response to: murat kerimoglu
murat kerimoglu wrote:

I worked somethings on LocalBroadcastManager matter.

And I'm continuing on this matter for to receive sms now.

But, how can i edit my codes for to receive sms ?

You're using the LocalBroadcastManager to send the broadcast from within your Delphi code. In my other post, I
explained that you would need to create a receiver in Java code, and use LocalBroadcastManager to send the broadcast
from there.

I'm working on a complete solution that should be re-usable for situations other than receiving SMS notifications. No
guarantees as to when it will be done.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: How can I receive SMS ?
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 7:56 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:

I'm working on a complete solution that should be re-usable for situations other than receiving SMS notifications. No
guarantees as to when it will be done.

OK, it took less time than I expected.

I've posted a complete solution for intercepting SMS messages in a basic GUI app in the .attachments group, a link for
which is here:

https://forums.embarcadero.com/thread.jspa?messageID=899142

I've structured everything with the intention of being able to respond to broadcasts other than receipt of SMS messages.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 8:01 PM   in response to: Dave Nottage in response to: Dave Nottage
I wrote:

I've posted a complete solution for intercepting SMS messages in a basic GUI app in the .attachments group

A couple of other things:

I didn't include the Java code I used to create the .jar file; this is it:

package com.delphiworlds.kastri;
 
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;
 
public class DWMultiBroadcastReceiver extends BroadcastReceiver {
 
  public void onReceive(Context context, Intent intent) {
    // Simply forward on the intent in a local broadcast
    LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
  }
 
}


Also, if you examine the AndroidManifest.Template.xml, you'll note I added a couple of entries. They're highlighted
with xml comments that contain some asterisks, e.g.:

  <!-- ***** Permission required for receiving SMS message received broadcasts ***** -->


--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 14, 2017 3:02 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:

I've posted a complete solution...

I've since discovered that having a receiver in Java code isn't actually necessary. I've modified the demo project to
reflect this.

It's based on this:

https://github.com/barisatalay/delphi-android-broadcast-receiver-component

And the associated blog post:

http://brsatalay.blogspot.com.au/2014/10/delphi-android-dinamik-broadcast.html

(Use Google Translate if you can't read Russian)

I'll still do a blog post, however with the changed strategy.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
murat kerimoglu

Posts: 59
Registered: 8/14/17
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 15, 2017 9:10 AM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
I've posted a complete solution for intercepting SMS messages in a basic GUI app in the .attachments group, a link for
which is here:

https://forums.embarcadero.com/thread.jspa?messageID=899142

I've structured everything with the intention of being able to respond to broadcasts other than receipt of SMS messages.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Dear Dave Nottage, Hello,

Firstly, very thanks for your very important comments and solition on this matter.

Excuse me, for my late comment. Because, i' tried each of your all instructions.

Unfortunately, i couldn't get any result yet. I'm probably doing wrong somethings.

Now, i will go step by step for to get result. Because very important matter for me.

I tried your MultiReceiverDemo but i got (File not found 'DW.GlobalDefines.inc')

error for {$I DW.GlobalDefines.inc} row in (DW.MultiReceiver.Android) Unit page.

I'm wanting to run your MultiReceiverDemo app now but where i'm doing wrong ?

Greetings.
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 15, 2017 9:49 AM   in response to: murat kerimoglu in response to: murat kerimoglu
Am 15.09.2017 um 18:10 schrieb murat kerimoglu:
Dave Nottage wrote:
I've posted a complete solution for intercepting SMS messages in a basic GUI app in the .attachments group, a link for
which is here:

https://forums.embarcadero.com/thread.jspa?messageID=899142

I've structured everything with the intention of being able to respond to broadcasts other than receipt of SMS messages.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Dear Dave Nottage, Hello,

Firstly, very thanks for your very important comments and solition on this matter.

Excuse me, for my late comment. Because, i' tried each of your all instructions.

Unfortunately, i couldn't get any result yet. I'm probably doing wrong somethings.

Now, i will go step by step for to get result. Because very important matter for me.

I tried your MultiReceiverDemo but i got (File not found 'DW.GlobalDefines.inc')

error for {$I DW.GlobalDefines.inc} row in (DW.MultiReceiver.Android) Unit page.

I'm wanting to run your MultiReceiverDemo app now but where i'm doing wrong ?

Greetings.

Hello,

did you check if there is such an include file on your system?
If not, what happens if you comment out this include line?
(most likely compilation will fail but it's still worth a try, maybe
Dave only has some debugging defines or so in it).

Greetings

Markus
murat kerimoglu

Posts: 59
Registered: 8/14/17
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 15, 2017 1:12 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:
Am 15.09.2017 um 18:10 schrieb murat kerimoglu:
Dave Nottage wrote:
I've posted a complete solution for intercepting SMS messages in a basic GUI app in the .attachments group, a link for
which is here:

https://forums.embarcadero.com/thread.jspa?messageID=899142

I've structured everything with the intention of being able to respond to broadcasts other than receipt of SMS messages.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Hello,

did you check if there is such an include file on your system?
If not, what happens if you comment out this include line?
(most likely compilation will fail but it's still worth a try, maybe
Dave only has some debugging defines or so in it).

Greetings

Markus

Dear Markus Humm, Hello.

Ok. I excluded this line from unit page and I added require unit.
It's working perfect now.
Very thanks for your comments.

Greetings.
murat kerimoglu

Posts: 59
Registered: 8/14/17
Re: How can I receive SMS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 15, 2017 1:29 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
Dave Nottage wrote:

OK, it took less time than I expected.

I've posted a complete solution for intercepting SMS messages in a basic GUI app in the .attachments group, a link for
which is here:

https://forums.embarcadero.com/thread.jspa?messageID=899142

I've structured everything with the intention of being able to respond to broadcasts other than receipt of SMS messages.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Dear Dave Nottage, Hello,

Very thanks for your perfect solution and helpful comments.

It's working perfectly. It will very useful for Delphi Android Developers.

Thanks again for your solution.

Greetings.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02