Here my problem with "trying" to do one simple apps to "Push Notifications" using: -> RAD Studio XE10.2.3 -> Firebase service (GCM) by Google. (before was Google Cloud Message, now is Firebase Cloud Message service, but GCM is build-in in Firebase console)
First, I have my account in Google, and, on Firebase services, I have my project created and one apps defined. I have my ID and Key to my project/apps! Its ok, for while!
My project Test is in RAD Studio XE10.2.3, and is very simple: --> 1 form FMX (in blank) --> 1 component EMSProvider (without any changes, all default property for tests) --> 1 component PushEvents, bind in EMSProvider, without any changes, too! --> there is not any code in my project! Just this components above.
NOTE: In order to create this "Push Notification" project, I have already installed the "30831_rad_studio_10.2.3_android_push_notification_patch 2017-March-27" patch because of the "bug" in the RAD Studio XE10.2.3 Tokyo with "push notification" (as already explained in several videos I already saw on YouTube about subject matter).
In my project OPTIONS, I have: (for all config Android (Release or Debug) --> Entitlement List -> Receice Push notifications = True --> Verions Info -> apiKey = (tested "with" and "without" my apiKey and Nothing...)
type TFrmMainAppPush = class(TForm) EMSProvider1: TEMSProvider; PushEvents1: TPushEvents; private { Private declarations } public { Public declarations } end;
var FrmMainAppPush: TFrmMainAppPush;
implementation
{$R *.fmx}
end.
My Project: https://oload.site/f/RssdHI9eVO4/MobileAndroidPushNotification.rar
My lasts line in my "AndroidManifest.template.xml" ... <%activity%> <service android:name="com.embarcadero.gcm.notifications.GCMIntentService" /> <%receivers%> </application> </manifest> <!-- END_INCLUDE(manifest) -->
My screenshots: https://image.ibb.co/iBZTfT/SKD_MANAGER_CONFIG.jpg https://image.ibb.co/jLhQS8/Cant_Bind_Address_Address_Already_In_Use_Existing.png https://image.ibb.co/dahTVT/Error1_later_run_in_Debug_Mode_when_my_apps_is_ended_in_my_smartphone.png https://image.ibb.co/cgT2qT/Error2_later_run_in_Debug_Mode_when_my_apps_is_ended_in_my_smartphone.jpg https://image.ibb.co/hKCOx8/My_Project_Definitions.png
Today, 22/Jun/2018, my AVG 2018 got one screen that was not showed before! https://image.ibb.co/gQRac8/Later_Sometime_Now_Is_Running_But_AVG2018_Got_The_File_Android_GDB_EXE.png
Now, my project is compiled and executed without error: "Can not Bind Address: Address Already In Use Existing"
********** before 22/Jun/2018
The project compiled and was sent to my smartphone, however, when trying to run I got the error message on the Debug screen of RAD Studio (not on the smartphone):
--> "Can not Bind Address: Address Already In Use Existing"
This for a long time, and several tests. I created more than one project and this message was always displayed.
The RAD Studio was re-installed for any error on my files, include was delete all folders and keys on Registry from Windows before new re-installation!
In this way, the app was run on the smartphone, however, it was "stopped" on the app's only home screen (since there were no other forms in the app).
On the smartphone side, no messages were shown. Only on the RAD Studio screen, in Debug mode. I could, on the smartphone, run the apps and nothing was shown error.
After several attempts, finally the application was compiled and executed without any error screen in RAD Studio, however, this time, before sending the application to the smartphone, now AVG Internet Security 2018 (antivius) "got" and showed a screen saying that the file "AndroidGDB.exe" was trying to access the internet. Something that had never been told before. By the way, I had already put the "ADB.exe" in the list of "exceptions" of AVG 2018.
Conclusion The new Antivirus with Firewall software seems to be more hostile with many applications than before, not even noticed. ----- END 1o problem -----
---- 2o problem start here ----
Well, now, a new clash begins between me and RAD Studio.
Now, after losing so much time with the above mentioned error, I come back to a new error that I was already trying with trying to create a test project for "Push Notification" messages.
Well before the above error, I was not able to understand where the error was with my project, since I had no code to promote the error that I will describe here.
Always after the application was sent to the smartphone and executed without any error, when closing it and returning to RAD Studio I had the following errors: (always in DEBUG mode): ---------- ---> Debugger Exception Notification: Project "NovoPush.apk" raised exception class Segmentation fault (11).
And right after the second error screen: ---------- ---> Debugger Exception Notification: Project "NovoPush.apk" raised exception class EAccessViolation with message 'Access violation at address 746F4E64, accessing address 746F4E64
And then Debug was terminated in RAD Studio.
Now, let's understand my side: (the message error appears as trying access objects or address memory invalid)
1) I do not have any source code typed in the project; 2) I have only 2 components that are linked by one of their properties (EMSProvider and PushEvetns)
Nothing else! No creation of any object is created or deleted manually, as there is no source code in the project.
There is only one form, which is the main form. Nothing else!
And now, what to do to understand this error! I've been trying to figure out where the error is in the project for 4 days.
If I compile in RELEASE mode, no error is shown. If I set the variable "ReportMemoryLeaksOnShutdown: = True;" in DPR, no further information is displayed. Only the above two error messages.
So I'm sending the source project so someone can understand and explain where the error is. Which I do not think they will find either.
I hope someone can lend a hand, thank you in advance.
hug
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
first we can not connect to GCM. second you can post you issue to https://quality.embarcadero.com
----------------------------------------------
(C)(P)Flying Wang