Massimiliano S
Members-
Content Count
31 -
Joined
-
Last visited
Everything posted by Massimiliano S
-
Hello, I've implemented Google authentication on my app using Firebase and the Kastri library. I've done all the configurations as per the GoogleSignin example project. On iOS, both in demo and on the Store, it works perfectly. On Android, it works correctly if I compile in development, but if I compile for the Store and upload it, the authentication returns a code 10. I've checked all the SHA-1 fingerprints for KeyStore.debug, development KeyStore, and the app in the Google Store at https://console.firebase.google.com/. I'm using the Client ID generated for the Web App (as per the example instructions) and not the Android ones (which just don't work). Do you have any suggestions on what it could be? Thanks Massimiliano
-
Google Signin Firebase for Store doesn't work
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hello Dalija, Yes I did it but it still works. I started from the example in Kastri I extracted the SHA1 from the Key Stores of the Debug App and the store of my application I went to https://console.firebase.google.com/ and created the application. I added the two SHAs plus Certificate of the app signing key, the SHA-1 Fingerprint taken from ttps://play.google.com/console I downloaded the JSON and took the client_id with "client_type": 3 If I compile in Development it works if I compile for store no, it returns code 10 I tried to use the other Client IDs too but they don't work Hello Dave, I struggled a bit but it works. It doesn't work with newer versions. What I did was start with v8.15.0, update Kastri to the latest version and add the missing files from a later version to FireBase. -
in firemonkey I save locally (win, IOS, Android) some Bitmaps in Jpeg format and reducing the quality and size. In this way 3 or 4 Mb files become 100 or 200Kb When I reload these files at runtime in a TBitmap of a Trectangle that I insert in a TListBoxItem, the RAM occupied is a lot, sometimes even 20 Mb. The result is that if I have to upload 150 files for a total of 20 Mb on the disk in memory I find myself occupying almost 600 Mb. Does anyone know why and how to decrease the occupation in memory? Thanks
-
Problem with Delphi RIO 10.3.3 and Google API Level 29
Massimiliano S posted a topic in Cross-platform
Hello I need to upload a test app on the google store. Unfortunately, the loading is not successful because Google requires at least a Level 29 for Android 10 as the target of the API while mine is 28. I am using delphi rio 10.3.3 I updated the SDKs by also installing 29 and downloaded the android-ndk-r21d NDK version. I then updated SDK manager set as android-29 target. Unfortunately, delphi always compiles by setting in the manifest: <uses-sdk android: minSdkVersion = "19" android: targetSdkVersion = "28" /> So I forced version 29 in the manifest template but unfortunately the app crashes I read that Delphi RIO theoretically supported the Android 10 version but I could not find anything about my problem other than a 6 month old post with no solution Has anyone found this problem yet? Thanks Massimiliano- 20 replies
-
- api
- play store
-
(and 1 more)
Tagged with:
-
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S posted a topic in Cross-platform
I have this problem,I have to make sure that my IO App made with Delphi Rio can appear in the list of apps with which to share a web link.For example if I am on safari and I am visiting a site I want to share this link with my app. I tried adding the management of CFBundleDocumentTypes and CFBundleURLTypes in the info.plist file but unfortunately my app does not appear in the list.Instead, there is the possibility to send the link to whatsapp, email, notes, and many other apps.Once opened my app must capture the link and use it internally.Do you know how I can do it?ThanksMassimiliano- 31 replies
-
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hi Dave, finally after a long time I managed to solve Thanks a lot to you, Chris and Allen. Without you I wouldn't have been able to do it. You are great developers and great people Massimiliano- 31 replies
-
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Thank you very much Dave, I'm going to try and finally hope to succeed. Chris's post is really complete and accurate and you at Allen have helped me a lot too- 31 replies
-
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hi Dave, Yes in Xamarin it is possible but I haven't tried it yet. https://forums.xamarin.com/discussion/177382/how-to-implement-share-extension-to-xamarin-forms-ios-project You would really do me a huge favor. Yes, I can confirm it- 31 replies
-
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Unfortunately following this POST I have not been able to create the archive file and I have stopped for two months on this problem. In fact, if I copy the whole PlugIns folder and insert the references in the deployment I always get this error: [PAClient Error] Error: E0776 error: exportArchive: "yashare.appex" requires a provisioning profile. [PAClient Error] Error: E0776 Error Domain=IDEProvisioningErrorDomain Code=9 ""yashare.appex" requires a provisioning profile." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="yashare.appex" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.} the PlugIns folder contains a yashare.appex folder which contains: yashare Info.plist embedded.mobileprovision Base.lproj \ MainInterface.storyboardc \ Info.plist Base.lproj \ MainInterface.storyboardc \ j1y-V4-xli-view-wbc-yd-nQP.nib Base.lproj \ MainInterface.storyboardc \ UIViewController-j1y-V4-xli.nib _CodeSignature \ CodeResources I tried with Ad Hoc mode but it's the same with Store mode. After creation of: all provisioning prodiles, parallel solution in xcode, certificates, Group etc .. What I have done is - Build in xCode (maybe something wrong here) - Copy the Plugins folder to my delphi project folder - Map all files in the deployment - Compile the Delphi version for Ad Hoc Last month I found this POST on Quality Center of embarcadero https://quality.embarcadero.com/browse/RSP-23804 Chris Pimlott seems to have had the same problem as mine and says Delphi is unable to add provisioning profile to plugIn He suggested an alternative method, that is to generate an Archive file in xCode with the parallel solution, from here extract the exportOptions.plist file, then from the command line on a mac launch a script with the various steps to create the archive with xcodebuild Unfortunately this solution also gives me an error and I always get this message 2020-09-10 16: 58: 54.881 xcodebuild [2882: 120742] [MT] IDEDistributionMethodManager: - [IDEDistributionMethodManager orderedDistributionMethodsForTask: archive:]: Error = Error Domain = IDEDistributionMethodManagerErrorDomain CodeInfo User Error = 2 "Unknown Distribution Error" {NSLocalizedDescription = Unknown Distribution Error} error: exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc Error Domain = IDEFoundationErrorDomain Code = 1 "exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc" UserInfo = {NSLocalizedDescription = exportOptionsPlist error for key 'method': expected one of {}, but found ad -hoc} Here, too, I'm probably doing something wrong but I don't know what. The idea I got, however, is that I am questioning delphi as a tool for developing apps. There is no documentation on App extensions even if they are very used and from embarcadero I have not had any support. At Xamarin I know that all these obstacles have overcome them- 31 replies
-
gallery Android 10 delphi 10.4 camera and gallery doesn't work
Massimiliano S posted a topic in Cross-platform
Hi, After updating to delphi 10.4 and SDK 29 the camera and gallery do not work on Android 10 Also delphi examples don't work. After taking a photo from the camera the app doesn't return anything while the gallery, after choosing the photo, raises this execption First chance exception at $ 00000074D87D473C. Exception class EBitmapLoadingFailed with message 'Loading bitmap failed (/data/user/0/com.embarcadero.CameraRoll/cache/IMG_20200911_1728082355078942815963051.jpg).'. Process CameraRoll.apk (11714) any ideas? -
gallery Android 10 delphi 10.4 camera and gallery doesn't work
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Here the Exception procedure TBitmap.LoadFromFile(const AFileName: string); var Surf: TBitmapSurface; begin TMonitor.Enter(Self); try Surf := TBitmapSurface.Create; try if TBitmapCodecManager.LoadFromFile(AFileName, Surf, CanvasClass.GetAttribute(TCanvasAttribute.MaxBitmapSize)) then Assign(Surf) -
Problem with Delphi RIO 10.3.3 and Google API Level 29
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Unfortunately there is no solution. I had to uninstall delphi 10.3 and install 10.4 This isn't cool because 10.3.3 is ultimately very recent and it can't possibly not support the latest minimal APIs- 20 replies
-
- api
- play store
-
(and 1 more)
Tagged with:
-
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Update I created the group with an administrator profile. Now I tried to do a test by uploading an empty app to the store (instead of mine in delphi) and my real extension. The upload worked so the problem seems to be related to delphi. If in the deployment I also enable embedded.mobieprovisioning then Delphi gives me the error [PAClient Error] Error: E0776 Error Domain=IDEProvisioningErrorDomain Code=9 ""yashare.appex" requires a provisioning profile with the App Groups feature." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="yashare.appex" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.} If instead I exclude it then Delphi creates the IPA file for me but during loading APPLE gives me this error ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '4WXQVJ6QJ7.it.diesys.youaddict.yashare' for the key 'application-identifier' in 'Payload/YaApp.app/PlugIns/yashare.appex/yashare'." maybe there is something wrong with embedded.mobieprovisioning file or I need to change something in the Delphi deployment, I don’t Know- 31 replies
-
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hi, I created the Share extension type app in xcode and embedded it into my delphi project. After solving all the problems described above everything works in development and ad hoc. (thanks Dave and special thanks to Allen) But I had to remove the appex "embedded.mobileprovision" from the deployment: In App Store mode When I compile for the app store if I also enter "embedded.mobileprovision" in deployment tthen I get this error. [PAClient Error] Error: E0776 Error Domain=IDEProvisioningErrorDomain Code=9 ""yashare.appex" requires a provisioning profile with the App Groups feature." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="yashare.appex" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.} I checked the provisionings they are correct,s . both (app and extension) supports group If I disable "embedded.mobileprovision" for appex in deployment then delphi compiles the ipa correctly, however, when I try to upload IPA files to the store I get this error. ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '4WXQVJ6QJ7.it.diesys.youaddict.yashare' for the key 'application-identifier' in 'Payload/YaApp.app/PlugIns/yashare.appex/yashare'." In xcode everything looks fine Extension App- 31 replies
-
When I compile in ad hoc mode even if the provisioning contains several devices, the app can only be installed on my iPhone while on the others the installation fails. using https://www.diawi.com/ and direct connect for installing app. This did not happen before inserting of a Share Extension made in xCode. Another strange thing, when I do a share somthing with my iPhone and my app I see a notification on my mac's safari When I compile with delphi in ad hoc mode, even if I connect another phone (included in the provisioning), the app is reinstalled on my remote and as a Target device in delphi I have always and only my phone and I cannot remove it. The provisionings are correct (in delphi and xCode) and until yesterday they have always worked, my doubt is that it is something left inside the xCode project but I don't know what. I have searched everywhere. Bye Massimiliano
-
IOS Ad Hoc deploy work only one Device
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Update if I compile in Ad hoc on xCode with the same provisioning it goes to all devices. When I am delphi it can only be installed on mine -
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hi Allen, received email, thank you very much My app must listen to receive links (both closed and open) and it is not necessary to send anything to the extension. Does this mean your app must open/run if it’s not running when the extension needs it? Yes, if my app is closed it should open automatically when a link arrives A bit like android intents and a bit like other apps do (e.g. notes etc ..) Where should I insert this code? Now what I have to do is send the Link, how do I capture and send it? I have never made this type of app extension, so I am not sure where you place the code on XCode side until I know what extension you are making. Each app extension works differently. I have seen that this extension has 2 methods IsContentValid didSelectedPost The first I think should be implemented with the controls on the selected content The second should send the place (I suppose) Then there is a configurationItems Are you making a “share” extension for Safari? Are you trying to capture all urls from Safari into your app? Could you explain what you are doing a little bit better? If you could clarify I might be able to advise you where to capture what you want to capture. The precise operation is as follows: The user browses the websites and when he finds a site he likes, he shares it with my app. My app must simply receive only a url that runs to a web services that I have made and that extracts from the site the name and some information that may be useful to the user. For example, I browse the site https://www.zara.com/it/it/donna-borse-pelle-l1041.html?v1=1549268 I see this bag that I like and I decide to save it. My app receives this link, processes it and saves it into a personal database So the only information needed is the site address and perhaps the name- 31 replies
-
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hi Allen, Hi Dave I received, thank you very much, yes in theory I should be on vacation with my children but until I close this problem I'm blocked. I created a group on apple and managed to put my share exension in delphi and compile. The problem is that now my share extension and my app in delphi are two empty boxes. Probably now the most is done but I don't know xcode and I'm struggling a bit. If I now run my app on the iPhone the strange thing is that if I share a safari link to my app what happens is that the same site opens for me on the mac So the first thing to do is work on the app. My app must listen to receive links (both closed and open) and it is not necessary to send anything to the extension. To do this I have to enter this code but it is not clear where. In the OnCreate of the main form? var Defaults: NSUserDefaults; SharedSettings: MissingNSUserDefaults; begin { Init with the proper Application Group suite name } Defaults := TNSUserDefaults.Alloc; SharedSettings := TMissingNSUserDefaults.Wrap((Defaults as ILocalObject).GetObjectID); SharedSettings.initWithSuiteName(StrToNSStr('group.it.diesys.yadiesys')); I think this part is used to send data to the Share Extension and therefore in my case it should not be necessary, right? { Save SomeKey/SomeValue to the shared settings } SharedSettings.setObject( (StrToNSStr('SomeValue') as ILocalObject).GetObjectID, StrToNSStr('SomeKey') ); { Update the settings } SharedSettings.synchronize; Should the synchronize be called every time something is sent? How does the app know when a link is sent to it? and how can I extract it? Now comes the more complex part because I don't know xCode If I open my Extension I only have a file a ShareViewController.h file with the interface and a ShareViewController.m that implements the interface. #import "ShareViewController.h" @interface ShareViewController () @end @implementation ShareViewController - (BOOL)isContentValid { // Do validation of contentText and/or NSExtensionContext attachments here return YES; } - (void)didSelectPost { // This is called after the user selects Post. Do the upload of contentText and/or NSExtensionContext attachments. // Inform the host that we're done, so it un-blocks its UI. Note: Alternatively you could call super's -didSelectPost, which will similarly complete the extension context. [self.extensionContext completeRequestReturningItems:@[] completionHandler:nil]; } - (NSArray *)configurationItems { // To add configuration options via table cells at the bottom of the sheet, return an array of SLComposeSheetConfigurationItem here. return @[]; } @end Where should I insert this code? NSString *const AppGroupName = @" group.it.diesys.yadiesys'"; This shouldn't be necessary because my Extension just has to send, right? // Settings passed from the host application NSString *someValue; Where should I insert this code? // Create and share access to an NSUserDefaults object NSUserDefaults *sharedSettings = [[NSUserDefaults alloc] initWithSuiteName: AppGroupName]; Now what I have to do is send the Link, how do I capture and send it? Thank you very much Massimiliano- 31 replies
-
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hi dave, sorry it's always me and I would love to repay you for your precious help I was able to compile the plug in and make IOS see my app in the share. Now unfortunately I have to complete the code but I have problems doing it and the example is not very clear to me https://blog.grijjy.com/2018/11/15/ios-and-macos-app-extensions-with-delphi/ What I need to do is put the code in xcode to send the link in my plugin and put the code in delphi in my app to get the code. Do you have any tips or an example already done? Then if you come to Italy I will have to offer you a drink Here the code of my plug .it #import "ShareViewController.h" @interface ShareViewController () @end @implementation ShareViewController - (BOOL)isContentValid { // Do validation of contentText and/or NSExtensionContext attachments here return YES; } - (void)didSelectPost { // This is called after the user selects Post. Do the upload of contentText and/or NSExtensionContext attachments. // Inform the host that we're done, so it un-blocks its UI. Note: Alternatively you could call super's -didSelectPost, which will similarly complete the extension context. [self.extensionContext completeRequestReturningItems:@[] completionHandler:nil]; } - (NSArray *)configurationItems { // To add configuration options via table cells at the bottom of the sheet, return an array of SLComposeSheetConfigurationItem here. return @[]; } @end- 31 replies
-
I'm looking at this example because my app stops when it receives an intent if the app is already running https://github.com/Embarcadero/RADStudio10.4Demos/tree/master/Object%20Pascal/Mobile%20Snippets/AndroidIntents The example says: ReceiveIntent ReceiveIntent project has one source file, Unit1.pas. It receives and shows the text from the SendIntent application. HandleIntentAction function verifies that the intent contains information and shows the text on the TMemo1. HandleAppEvent function verifies that the intent is not null and calls HandleIntentAction function with the received itent. This function handles the intent the first time ReceiveIntent opens. ReceiveIntent procedure handles the intent when ReceiveIntent is already open. The itent is register using MainActivity.registerIntentAction(TJIntent.JavaClass.ACTION_VIEW);.To receive simple data from other applications, you need to update the Android Manifest file to create the intent filters that are necessary to receive intents for a specific action. After editing the Android Manifest for a specific action, when SendIntent application tries to share the information passing the intent to startActivity(), ReceiveIntent appears as the option to view this information. If more than one options is available, an app chooser with all the apps appears. Unfortunately I don't see this procedure ReceiveIntent do you know how to handle this situation? Thanks Max
-
FMX.Android Intents Sample missing procedure
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hi Dave, Do you have any hints and tips on what to look for? I'm stuck and on the various other forums (also Idera/Emarcadero) I'm not getting any response, eternally grateful MAx -
FMX.Android Intents Sample missing procedure
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Thank you, unfortunately it does not solve the problem. The problem would seem to be related to the fact that Chrome opens the app internally within a custom tab, but it is a hypothesis If I use other browsers such as Dolphin, the intent is managed whether the app is closed or already open. On the other hand, if Chrome finds the app open, it still launches a second instance internally which, however, remains blocked on the splash form until I close the first app I have seen that Chrome also behaves like this with all the other apps (gmail, whats app etc ..) which, however, are still able to manage the call I tried to modify the manifest, the launchmode but I can't prevent this or manage the double execution anyway. I am now working on a test app and then port the change to mine which uses the same principle, but this issue is blocking for release I tried to declare a second activity different from main but I didn't find how to register the action. It is seen by chrome in shared panel but it is not launched. here i found some configurations to put in the manifest but nothing seems to work https://developer.android.com/guide/topics/manifest/activity-element#embedded I thought about trying with the remote services but I don't know if a service can manage the share from chrome and if it solves the problem. Or are there other possibilities? I enclose the project if it can be clearer where I am going to save all the steps that are made in a text file. Thank you very much for your availability ReceiveIntent.zip -
FMX.Android Intents Sample missing procedure
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hello, Thanks a lot for the answer The problem is that I have changed my manifest from <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:mimeType="text/pas" /> </intent-filter> to <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="application/*" /> <data android:mimeType="message/*" /> <data android:mimeType="multipart/*" /> <data android:mimeType="text/*" /> </intent-filter> In order to have the ability to receive shared links from chrome When the app is closed everything works and after the first share app is launched, but when the app is already open Chrome opens a second instance internally and the app hangs on the splash until I close the already open app Using this example I have the same problem Like my app, when the app is already open the intent is not managed and the app remains blocked Kind regards Max -
Using Intent - Chrome sharing does not work if App is already active
Massimiliano S posted a topic in Cross-platform
Hi, I have an app that receives web url sharing via intent. When I share from all apps or from any browser, my app receives the content and processes it correctly. If the app is not already open then it is successfully launched. When I share with chrome the app is instead opened in chrome and if the app is already running it stops responding until I close the previous instance already active Here my Manifest template <application android:persistent="%persistent%" android:restoreAnyVersion="%restoreAnyVersion%" android:label="%label%" android:debuggable="%debuggable%" android:largeHeap="%largeHeap%" android:icon="%icon%" android:theme="%theme%" android:usesCleartextTraffic="true" android:hardwareAccelerated="%hardwareAccelerated%" android:resizeableActivity="false"> <%provider%> <%application-meta-data%> <%uses-libraries%> <%services%> <!-- Our activity is a subclass of the built-in NativeActivity framework class. This will take care of integrating with our NDK code. --> <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity" android:label="%activityLabel%" android:configChanges="orientation|keyboard|keyboardHidden|screenSize" android:allowTaskReparenting="true" android:launchMode="singleTask"> <!-- Tell NativeActivity the name of our .so --> <meta-data android:name="android.app.lib_name" android:value="%libNameValue%" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="application/*" /> <data android:mimeType="message/*" /> <data android:mimeType="multipart/*" /> <data android:mimeType="text/*" /> </intent-filter> </activity> <%activity%> <%receivers%> </application> OnCreate of Main Form {$IFDEF ANDROID} ContaIntent := 0; if TPlatformServices.Current.SupportsPlatformService (IFMXApplicationEventService, AppEventService) then AppEventService.SetApplicationEventHandler(HandleAppEvent); MainActivity.registerIntentAction(TJIntent.JavaClass.ACTION_VIEW); MainActivity.registerIntentAction(TJIntent.JavaClass.ACTION_SEND); TMessageManager.DefaultManager.SubscribeToMessage (TMessageReceivedNotification, HandleActivityMessage); {$ENDIF} Thanks -
share extensin IOS App receive shared web link from Safari and Other apps
Massimiliano S replied to Massimiliano S's topic in Cross-platform
Hi Dave, thank you very much for your reply, you are very kind I confirm that I have not enabled universal binary and that I am compiling only 64 bit I have attached a test application. The PlugIn was done with Visual Studio code 11.4 and SDK 13.5 The delphi project (this test but also the final one) is with Rio 10.3.3. and SDK 13.5 If I compile in delphi the project without plugIn works If I compile the app in xCode with the Share Extension it works If I compile the delphi project with the Share Extension compiles correctly but then the app does not start and says that it needs to be updated Bye Massimiliano yadiesys.zip- 31 replies