Jump to content

Tntman

Members
  • Content Count

    76
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Tntman

  1. Tntman

    ANN: sgcWebSockets 4.3.6

    Hello, I tried some of your components few months ago and I can say that they works nice, I have not tried a lot of features and components but what I tried works nice.. Also I was sending an e-mail to your support team and they answered in period of 24hours so thumbs up for that 👍 I have to add that I am not actual customer and I used trial version.
  2. Tntman

    Global StyleBook component

    Here is what i figured out. apparently, there is no need to add it to a data module. U can just drop stylebook onto any form edit components and put unique names for them. After that you can go on other from drop component and use StyleLookup property where you have to put unique name that you have in your StyleBook for that component, ofc before that you have to save your style... Conclusion is that stylebook is global if u save it, it just wont appear in stylelookup property dropdown, but if u put exact name it will glab a style.
  3. Tntman

    Drone control from mobile

    Agree, i sent him some code samples, its just few lines of code really .. Also a lot of people that repair and diagnostic cars in my country use delphi software
  4. Tntman

    Minifing HTML

    Answer to this question is crucial for helping him out i think .. Anyway i can recommend "webpack" for this job.. for example in web development I am using webpack and some other tools/libraries to minify code and it is helping a lot. that said maybe owner of this topic could try to incorporate it somehow in his project..
  5. Tntman

    Drone control from mobile

    I will send you link to my website over pm since im not sure if it is allowed to post or advertise here .. Just to say my site is not finished 100% but u will find some stuff that is documented about arduino ( scripts that are commented ) , also u will find some useful stuff for writing delphi PC apps that send commands to arduinos ( library that is not mine ) when u download library there are some demo applications so u will figure out everything , its pretty easy but still if u have any questions send me PM anytime .. For android i were using winsoft trial library because i wanted to do things fast, I will rewrite it probably
  6. Tntman

    Drone control from mobile

    Minified versions are cool but i dont have space and i didnt want to use my poor soldering skills for this lol i was more oriented to writing software.. You mean to upload delphi code on arduino or just send commands from delphi app that is on PC or mobile ? Btw i can share anything you want, i also have other delphi arduino projects with code samples
  7. If we talk about windows platform we can embed some resource data ( for example strings ) into our exe. For example we have app "A" and app "B". Lets say that app "A" is our main app. App "B" is secondary app ( .exe - windows compiled ) with some RCDATA strings that are embedded in it. We could load app "B" into app "A" and change resource data in app "B" from app "A" ( this can't be done if app "B" is running, app "B" needs to be closed ). If we talk about windows platform VCL or FMX we could do this with -> https://docs.microsoft.com/en-us/windows/win32/menurc/adding-deleting-and-replacing-resources My question is: What or is there any way to do this multi platform ? ( android,ios,mac,wearables,linux ... ) I suppose that it cannot be done exactly like in windows because some stuff that I mentioned are for windows only.. So what would be the best way to achieve same thing on other platforms ( android,ios,mac,linux,wearables ... ) Also imagine that we have FMX app that is compiled for windows ( we will call it "Win-app" ) and we have other app that is for android and it is built/compiled with delphi FMX ( we will call it "Andro-app" and it will have .apk extension ). Is it possible to load "Andro-app" .apk to "Win-app" and edit embedded resources in "Andro-app" from "Win-app"? <- Is this also possible for other platforms ( Ios,Mac,linux,wearables - make "win-app" that load and edit for example resoruce strings in "ios-app", "mac-app", "linux-app" ...etc... ) I don't need code, I just need someone to point me out and give me directions and I will try to learn on my own since it is so interesting topic. Thank you
  8. Tntman

    FMX- Cross platform embed resources

    Yes im using 10.3 free version.. Well ok i kinda understand whole concept behind signed apps .. If apps are not signed it could easily be abused
  9. Tntman

    FMX- Cross platform embed resources

    I was thinking that you can just post any .apk to marked ... didnt know that there are some other options for that, i will try to read more about it
  10. Tntman

    FMX- Cross platform embed resources

    Can you explain me the procedure and why u think that it could not work ? I have never published any app to market i dont even have acc there EDIT: i am talking about android play store, not apple store
  11. Tntman

    FMX- Cross platform embed resources

    open in winrar without unziping it so just open. Find text file open it, change data and save text file
  12. Tntman

    FMX- Cross platform embed resources

    Hmm so basically i added txt file over the IDE ( option resources and images ). I compile app and run on nox, it installed with no problem, after clicking on a button im loading content of txt file that i added in memo and everything works. After that i go to bin directory on my windows machine and edit that txt document inside of an .apk file and upload again to nox, install again and open app in nox it works , it is installed and when i click button it loads txt file with different content and everything works fine so im little bit confused now
  13. Tntman

    FMX- Cross platform embed resources

    I am not sure did you understood my question or maybe i described it poorly so i will try to explain it again.. Here on this link you can see delphi resource hacker. http://www.angusj.com/resourcehacker/ Tool is used to update ( edit ) resource strings in windows executables ( .exe ). I used this tool to edit resources strings in games ( overwriting money value for example ) What i want to ask is it possible to make similar application in delphi fmx for windows that will be capable of updating ( editing ) resources strings in other executables for different platforms ( .apk, Linux executable, mac executables, ios executables... ) Also my other question is where is best place and what is best way to embed/include resource strings that can be updated ( edited ) on other platforms except windows ( android, mac, ios, linux... ).
  14. Tntman

    Connection string encryption

    It does not matter. It's the same idea for mobile, desktop, watch or website... Even if we write apps only for ourselves we should use this approach. I have my own website and few apps and i still use this approach that i wrote...
  15. Hello, I was developing a mobile application for my school, I were using Delphi Rad Studio Rio 10.3. Here is brief description what application is doing: in some editboxes user adds data -> proceed to next tab On second tab user is choosing video that he wants to preview, while video is playing he is clicking some buttons to mark duration of some activities on video that he loaded ... After that i am making a PDF report and saving to storage. I made whole application and it is working great, problem is that I used this library for slowing down video preview -> https://github.com/Zeus64/alcinoe i had some issues with this library ( most of them were configuration issues ) but at the end I managed to resolve all of them and make my app. So why I used this library? Answer is that it had option to set speed preview of video. Before I started using this library i was trying for a few days to implement this -> https://stackoverflow.com/questions/18526336/playback-video-in-slow-motion-in-android check answer from " karanatwal.github.io " Problem was that I didnt know how to rewrite this android code into delphi FMX code : videoview = (VideoView)findViewById(R.id.videoview); videoview.setVideoURI("Your Video URI"); videoview.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { //works only from api 23 PlaybackParams myPlayBackParams = new PlaybackParams(); myPlayBackParams.setSpeed(0.5f); //here set speed eg. 0.5 for slow 2 for fast mode mp.setPlaybackParams(myPlayBackParams); videoview.start();//start your video. } }); So now I would like to rebuild my application and exclude this " alcinoe " library cuz I use it only for setting playback speed.. Can somebody help me rewriting this to a delphi code ? Thank you EDIT: I will later post code snippet of how i retrieve path of video and how i load it, code is not that great because it was one of my first projects but maybe it will help someone who reads this.
  16. At the end I though that it is not possible.. At least with my current knowledge delphi syntax and Android... Thank you for explaining it to me, I will try to google more about the stuff you mentioned in your post sounds like interesting topic to learn from
  17. Tntman

    Connection string encryption

    If i understood right you have mobile application with service that is working in the background. That service should perform some request/response to a database? Here in this design you are missing crucial part and that is web application that will be hosted in the middle, web application code will be on remote server and nobody would see that code ( thats a plus, they basically cant crack it they can only imagine how that application is written although there are some other security concerns ). Your database credentials will be only in web application and only web application will be talking DIRECTLY to a DB. That is why u will be making a public interface that will be available to end user and that is called API ( APplication programming interface ). your API will be public and anybody could guess you api route for example ( www.mysite.com/api/customers ) One common way of protecting routes is to restrict them, example: www.mysite.com/api/customers <- this route is PUBLIC [ GET ] route. Anyone who visit this link will get list of all customers in your database in JSON format for example. www.mysite.com/api/otherRoute <- this route is PUBLIC [ GET ] route but this route will have middleware in between request and response. Middleware will check if PERSON who is visiting this route is authenticated, it is authenticated it will return data. Anyone who visit this link ( if is authenticated - have valid token ) will get list of all customers in your database in JSON format for example. You can basically put any logic in middleware, so for example if user is authenticated we will check if user role is ADMIN, if is we will return list of some stuff that only ADMIN can see. You got the point... Here is brief example how it should actually work behind the scenes. User visit some api route or application itself visits it ( for example www.mysite.com/api/exampleRoute ). Webapplication is checking request, it is first checking if it is POST or GET request, it is checking also for Request parameters that are passed with request and all other stuff. If validation, middleware and all other stuff pass webapplication will connect to a DB and retrieve requested data and return to end user in JSON or some other format ( usually its json ). If validation fails webapplication will not talk to DB and it will return error response for example. Note* Web application could be written in basically any language ( PHP, node js , delphi , python , c....etc... ) I personally use PHP, Laravel ( PHP's Framework ) node and i know little bit Java/Spring... ************* JSON web tokens ( JWT ).. JWT's are lightweight implementation or u could use Oauth or Oauth2 implementation but those are more complicated and heavier.. For any of this implementations you have REST debugger in Rad Studio to help you and give you nice GUI interface instead of writing code on ur own.. NOTE* If you dont know php,nodejs,python and you dont know how to write api's and stuff i mentioned in this post you could use public API's. There is a big number of publicly avialable api's , crypto apis,weather apis or even twitch api. I used twitch api for my desktop app that tracked list of online streamers and some other stuff.. https://jwt.io/introduction/ <- here u can read more about JWT's i can add that JWTs are stateless so with every request you have to add them as a parameter so server can check if that token is valid,blacklisted etc... NOTE* when i say stateless i mean there is no actual session on web server that is attached to particular user.. So when webserver validate user credentials and return JSON web token you could store that web token anywhere. If we talk about websites ( I am sure that you can open local storage on your web browser and search for tokens from some particular web sites that you use ). So you could ask now " What will happen if someone steal ADMIN token from ADMIN's browser local storage and send it with request and perform operations THAT ARE ONLY RELATED TO ADMIN " ... <- This is possible scenario , but on webserver-database end you could put field in database that will check IP, request user agent and client, if those parameters dont match with previous request it means that someone have stolen token and trying to send request with ADMIN token from different device/browser etc so u could possibly limit it or destroy token or prompt login page again... I am probably talking too much and confusing you so i will stop ... Anyway ur question was where do I suggest to save password for a background service? So u are not saving users password, you just prompt login screen so user enters his username and password and perform [ POST ] request to some of your API routes ( for example www.mysite.com/api/login ), if everything is valid you will get JSON web token from server. You save that token. Tokens could have expiration date, that expiration date is set where JSON web token is created. JSON web token that will be sent to user is created in web application.Web application and it's code is running/stored on remote server. So everytime when background task perform some request it will grab Token and send with request. web app validate that and give proper response. If token is expired web server will give a "expired" response to your task. So your task is going to receive response , if response is " expired " it will give notification to user to log in again so he could get new token or something like that. If there is no need for particular data to be accessed from users that are authenticated you can just make a public route i explained that in the top of the post "www.mysite.com/api/customers <- this route is PUBLIC [ GET ] route. Anyone who visit this link will get list of all customers in your database in JSON format for example." You wrote post here saying " Encrypting a string or password is easy, harder is how you protect the key used for the encryption. " In scenario that i tried to explain "key" used for encryption is on remote server, and nobody knows about it. SO that key will check against token that is sent via request.. Also search for terms "Personal access token" it is used in almost any app
  18. Tntman

    Connection string encryption

    The one and only way to do this is how i described .. what i told you is best practice and how it is done, there is no other way "We use an config file to store the database connection string". <- this is bad , security risk, it is unacceptable "We are thinking about encrypting the connection string". <- this can be a "solution" but u will never be sure that you are safe Is there any best practices to keep the connection string information safe? People can give you ideas and solutions how to encrypt string but you will still not be safe 100%.. From what you told us about your application i can see that it is not that big and that u already have hosting for database. That said u can just put some php code there and make api .. U can even make api in delphi
  19. Tntman

    Connection string encryption

    When he submit credentials ( for example email and user password) over post request to api server will validate credentials and if true server will return JSON token, that token will be stored on users phone. you can set token expiration time for example 30 min and that token will be valid only for that particular user for next 30 minutes... After retriving token you will be submitting that token for every future request and server will walidate it.. SO basically he is talking to web server, web server validate data and talks to DB. It is way more secure.. Password for DB is stored on web server and code logic for talking to DB is on web server so users dont know DB password or logic how web server communicated to DB Next security level that he could add is to ( if web app - web server and DB are hosted on the same machine ) disable remote login, or if they are split to two different servers he can just allow his IP web server to talk and retrieve data from DB.. It is almost never good practice to talk directly to DB from almost any app .. Sry if i was offtopic
  20. Tntman

    Connection string encryption

    You are storing information to connect to remote database fore example MySql ? It is not good to store any password related stuff in any application, have you consider making API and perform DB request over it ?
  21. Tntman

    Animating TListViewItem

    Hello members! I started learning delphi few months ago and recently i discovered that we can make really beautiful user interfaces with delphi FMX styles. I saw on the internet this animation demo ( This is just a design ) and I wanted to implement it in delphi: https://thumbs.gfycat.com/ShamelessConfusedAmbushbug-mobile.mp4 I was thinking to use ListView component in FMX for this with ItemApperance -> DynamicApperance. Everything was cool but i faced one problem. Problem is that I am not sure that TlistViewItem can perform animation when it is been added to the ListView. From my understandings i can only animate "Text1" and other items if i add them -> https://i.imgur.com/Y3SWIsT.jpg There is no option ( or I dont know how to find it ) To animate whole TListItemView when is added to a ListView. **WORKAROUND THAT I HAVE ON MY MIND** I was thinking to drop a ListBox and to add on it "TListBoxItem", after that i would right click it and Go on edit custom style, and try to make it look as i want. I tested this tutorial for editing the look of "TListBoxItem" and it is working nicely: https://www.experts-exchange.com/articles/10054/Implementing-a-ListView-in-Firemonkey.html For animation i planned to use this resources ( not tested, i dont know if it will work ) : So what is my question actually, well i would like to achieve similar design and effect from gif that i showed to you. I would like to use ListView with DynamicApperance. I would like to someone confirm me if that is possible and to give me some references or resource material where i could read more about it.. Also if there is someone who would like to give me a code example i would appreciate a lot. From my tests that i performed ( loop 1000 times, and add 1000 items on ListView and ListBox ) I can say that ListBox performed a lot slower so I would prefer ListView for this, also i think that using ListView here is better practice since ListView is more suitable for this situation based on this post: http://www.delphigroups.info/2/8f/544471.html At the end I just want to point out that im using FMX ONLY because i found it easier to make styles, this program is for Windows only platform. I am using Delphi Rio community ( Free version ). I would also like to add that option " Pull to refresh " that you see on that gif is not needed. Thank you for your answers and help! 🙂
  22. Tntman

    Animating TListViewItem

    I will try and see, i started yesterday developing my own design in Adobe XD so after that i will start coding
  23. Tntman

    Animating TListViewItem

    Hello. Interesting approach using TScrollBox, i never used TScrollBox before but as I can see it is not that hard to get in touch with it.. Let me elaborate more about what I would like to create and why I think that TlistView is my best choice.. That animation gif that I showed u would be just one part of the application. It will represent a user list ( Part of a chat room that I will try to make with IndyTCP components ). In one field I plan to put username, image, join date and some other stuff.. SO when user joins chat room it animates like showed on picture and update list ( basically add that user ). Users can change usernames in real time, so server will push that change to other users and update their GUI. From my understandings if I try to make this with TScrollBox I should make Rectangle and other components inside it ( labels, images etc... ) and on user join I in runtime add it to TScrollBox and display on GUI. I think that problem with this approach can occur because i would have to implement my own indexes for every field ( in TlistView for example you have OnItemClick procedure that is built in and that can figure out indexes behind the scenes for you ) also i think it will become buggy after adding like 1k rectangles with all the labels and images ( not tested that and I know that I wont have that much users just saying .. ) ... Short answer is that I am afraid to code that by myself because I am scared of making it crappy and inefficient but I guess it is the learning curve ... Links that you posted looks really nice, and I already see that I can learn a lot from them .. I thought that I watched every possible video related to delphi design on the youtube LOL but your links prove that I am wrong I will watch them closely and try to pick best approach for my app
  24. Tntman

    Android Mobile application using Firemonkey

    Now look of the app looks way better if u ask me. I think that problem related to app look was because you have not designed it first in Adobe XD , Illustrator or Photoshop. Can you please tell me what and how did u used layout for components ? ScaledLayout or just simple layout ? Thank you for your time
  25. Tntman

    Frequent compilation errors

    I get those errors sometimes, how i deal with it is to just save project and reopen it again and errors are gone.. I know that it is not cool way of fixing it but it works ..
×