Jump to content

houssam1984

Members
  • Content Count

    18
  • Joined

  • Last visited

Everything posted by houssam1984

  1. hello brothers , i am trying to make an android app useing delphi 11.3 , the app should read storage where i can select a pdf file the upload it into a distant server -getting permission is ok - i asked chatgpt and it gave me a model where the file path is shown in an edit "supposly" , when i run it , it show files but when i select a file nothing happened " i dont get anything in my edit" - then when i tr wrote the path of the file to upload "MANUALY" the idhttp send can not open file permission denied -please can any one help me !!!
  2. THANK YOU SO MUCH FOR ANSWERING MY STUPIDITIES
  3. ups !! i didnt say i am beginner , i partally understand what you said but if it is not toooooooooo far from me can you provide me any examples of code???
  4. well the video is great but what i want is to choose a file on my device from sdcard for exemple than upload it to a server over HTTP or REST
  5. hello ; permissions are to read storage in my android device ; if you dont get permission to read storage you cant access file location var Intent: JIntent; const PermissionReadExStrg = 'android.permission.READ_EXTERNAL_STORAGE'; begin if not PermissionsService.IsPermissionGranted(JStringToString(TJManifest_permission.JavaClass.READ_EXTERNAL_STORAGE)) then begin PermissionsService.RequestPermissions([PermissionReadExStrg], procedure(const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray) begin if (Length(AGrantResults) = 1) and (AGrantResults[0] = TPermissionStatus.Granted) then { activate or deactivate the location sensor } ShowFileChooser else begin ShowMessage('permission not granted'); end; end); end else ShowFileChooser; end; than showfilechooser procedure looks like : var Intent: JIntent; m:TMessageResultNotification; begin Intent := TJIntent.Create; Intent.setAction(TJIntent.JavaClass.ACTION_GET_CONTENT); Intent.setType(StringToJString('application/pdf')); SharedActivity.startActivityForResult(Intent, 0); end; and the uploading procedure looks like var HTTP: TIdHTTP; FormData: TIdMultiPartFormDataStream; begin if Edit1.Text = '' then begin ShowMessage('Please select a file.'); Exit; end else begin HTTP := TIdHTTP.Create(self); FormData := TIdMultiPartFormDataStream.Create; try FormData.AddFile('file', Edit1.Text, 'application/pdf'); HTTP.Post('my HTTP server', FormData); ShowMessage('File uploaded successfully.'); except on E: Exception do ShowMessage('Error uploading file: ' + E.Message); end; FormData.Free; HTTP.Free; end; the app runs normally but when i choose the file and click UPLOAD Button Nothing Happens
  6. thank you , its a simple server with http protocol , what i wanted is choose pdf file on an android device click a button "Upload" and the file will be uploaded to the server over http , i am sorry if i couldnt explain my self well
  7. i try to create an android application and it uses a custom font . i dont know if FMX.FontGlyphs.android is needed and if yes how and what to change in it????
  8. houssam1984

    Error Message after Update to 11.2

    yes , i solved it by reinstalling delphi on another partition
  9. houssam1984

    Error Message after Update to 11.2

    [MSBuild Erreur] Échec inattendu de la tâche "CreateAndroidManifestFile". System.IO.FileNotFoundException: Le fichier 'C:\Users\houss\AppData\Roaming\Embarcadero\BDS\22.0\AndroidManifest.xml' est introuvable. Nom de fichier : 'C:\Users\houss\AppData\Roaming\Embarcadero\BDS\22.0\AndroidManifest.xml' à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) à System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) à System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) à Borland.Build.Tasks.Utils.StreamFileCopy(String sourceFileName, String destFileName, Boolean overwrite) à Borland.Build.Tasks.Shared.CreateAndroidManifestFile.genManifestFile() à Borland.Build.Tasks.Shared.CreateAndroidManifestFile.Execute() à Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
  10. houssam1984

    Deploying macOS apps with App Store configuration

    hello sir; did you solve this problem?? i want to generate a pkg file but all i get is the message you got
  11. houssam1984

    is there any component to help me ???

    i am ceating an android application useing delphi 10.4 but i cant figure how to make a horizontal calendar like the one in the attachements
  12. i have a small "maybe big" problem with google play . so i created an app for android devices i uploaded it into google play consol , they say my app is now online but when i search it in google play store i can not find it , and when i search for the developper i find all my app except that one !!!! is there a trick or somthing i need to do????? or i can do???
  13. houssam1984

    AdMob in Delphi11

  14. houssam1984

    AdMob in Delphi11

    [dcc32 Fatal Error] DW.AdMobBannerAd.pas(14): F1026 File not found: 'DW.GlobalDefines.inc'
  15. houssam1984

    AdMob in Delphi11

    is there any detailed tutorial on how to make it fully work??? on 10.4 i just add a unit to my project and call it in uses but on delphi 11 .......... hhhhh it is more complicated i guess
  16. houssam1984

    AdMob in Delphi11

    didnt work for me can anyone post a tutorial on how to integrate it in my projects??? please !! thank you very much
  17. houssam1984

    Admob

    can any one give a solution for this problem?
  18. houssam1984

    Error when compiler an Android App with KeyStore File

    any solutions!! i have the same error here :'(
×