Jump to content

JohnLM

Members
  • Content Count

    369
  • Joined

  • Last visited

Everything posted by JohnLM

  1. @Patrick PREMARTIN. It depends. I was running a small test app (from a code snippet found elsewhere here on this forum in another discussion) and that app was showing me an IP 10.0.0.3 most of the time. And running on my cellphone, it was showing and IP 127.0.0.1
  2. Post Deleted - I got confused and posted a reply for another similar topic. I will update this one later.
  3. Update on this endeavor. . . So far, I have not been able to get App Tethering working on my laptop and Android phone via Delphi 11.2 Alexandria. This has been a big failure! And just to note, I've been working on multiple smaller projects having similar purposes/features.
  4. Delphi 11.2, Windows 7 Home Prem 64bit To my knowledge, this was the first time this has ever happened to me. When I opened a project from a window's folder by the .dproj file, I received this pop-up message, "Please enter a valid Embarcadero serial number" I tried opening other projects in this same way and received the same message. I normally open projects through Delphi but I was searching my folders for a project and opened it this way. Is this a known bug?
  5. I'm still debugging this connection problem. I tried setting the [Allowed Adapters] to 'Bluetooth' in both apps (VCL/Mobile) but it still will not connect. In this case, I get a black screen on the cellphone. I've been watching the video (posted link in the previous post above) many times and still do not understand why it will not connect. I believe that the person in that video did not cover enough of the process for App Tethering. I also believe he left out a number of steps in the source code.
  6. I've been debugging various things. I found that there are two passwords in each app, but Unit 1 seems to reference two, as shown below. Unit 2 - VCL app - 'TetherBDTest' - but makes no reference to it in the source code, nor does it check/verify it. Unit 1 - Mobile app - 'TetherBDTestClient' - this has a reference in the source code and has 'TetherBDTest' in it. I've compiled various password scenarios to no avail and still does not connect.
  7. Progress Update. . . Well, I tried the sample from the above video from the C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\Object Pascal\RTL\Tethering\BDShoppingList folder and it fails to connect on the mobile device. The VCL app is up and running, and the TetherDBClient compiles and runs on the mobile device, but there is no database showing and the two devices do not connect, that is, when I click on the [Connect] button on the mobile device. The screen on the mobile device is blank or white with the message "You are not connected" displayed at the bottom left.
  8. @Zoran Bonuš - I've been looking into the app tethering idea and found this video (below) but I've read some comments and some people say it no longer works. But I will take a look into it later today and see since the project is in my C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples folder, the project is dated 8/23/2022 so there must be some updates made since. @Remy Lebeau - I searched around for TCP/UDP demo(s) on tethering or sending/receiving data (text/image/etc) but did not find any source code snippets to get me started. I am not fluent in Indy as I'd like to be. Thank you both for your suggestions. PS: forgot to mention at the beginning, I am using the Delphi Professional, both XE7 and 11.2 versions, mainly using version 11.2
  9. I have an e-scooter that I use for riding around towns and trails. There is an app to download. However, that app does not connect to my scooter and the developer is slow to fix/resolve/respond and still does not connect. So, I would like to look into writing my own app for my phone (android) to do the following: 1. track start and end times 3. track my routes - where i've been or stopped at 4. show the miles I am traveling during my ride in real-time 5. show the total miles of my ride 6. possibly show speed (via calculation) and in real-time 7. eventually, to show a map of my route in real-time, and show all my stops Is this possible with Delphi 11.2 and free components/services/API's ?
  10. @ Rollo62, Hi, I am starting out slowly. But I've coded various apps on Android over the years since XE7. I am not fluent in the Permissions area, but so far in this project, I am okay with what I have working on. I ride through trails in my area, so I am using that as an opportunity to test my app in order to debug and make any necessary changes/additions.
  11. For step 2, I've added a tmemo control to hold all the data (latitude and longitude) that comes in during my travels. In addition, I added to the list to include an Index counter (line # 1, 2, 3, .. 200, etc.) and a time stamp entry for each lat/long value, thus. . . 001 - 5:06:03 PM - 0.0101-nnn : 0.0101-nnn 002 - 5:06:09 PM - 0.0102-nnn : 0.0102-nnn 003 - 5:06:10 PM - 0.0102-nnn : 0.0103-nnn I just need to find a way to plug those values for the lat/long into a map somehow and have it plot my previous travel route onto a map in my app. Next, I will research how to do this.
  12. After some searching, I found and tried various code snippets dating back a few years but they did not work because they were missing the code snippets for handling Permissions on Android or at least my phone's version of Android 12. Then, I decided to search around in my samples folder and did find a sample called, "Location" in the C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\Object Pascal\Mobile Snippets\Location folder. I compiled it into my Android phone and it work right from the start. Thanks, Embarcadero! I also found a couple of youtube videos, below, showing exactly this app in action. I believe I can complete steps 1, 2, and 6, below. 1. track start and end times 2. track my routes - where I've been or stopped at 3. show the miles I am traveling during my ride in real-time 4. show the total miles of my ride 5. possibly show speed (via calculation) and in real-time 6. eventually, to show a map of my route in real-time, and show all my stops
  13. Delphi XE7/11, VCL, win7 Hi everyone. I've got a problem here. Because of the angle that I have to have my laptop screen at, the image when playing videos is too dark. I can barely make it out. I've learned that I can adjust the color brightness level in windows. I may also need to custom change the other colors (contrast gamma hue sat) as well, and then reset them back to standard when I'm not playing videos from youtube. The tool I used to adjust the Brightness level is the Intel control panel applet, below. However, it is difficult to bring up when I need it. And I only just discovered it today. I used to just sit up higher in my chair, which was terrible. If this is possible, how can I do this in Delphi? TIA
  14. Delphi 11, win7, office 2010, ms access I did not know anywhere else to post this and thought it best here. I use Office 2010, and when I open an Access database and proceed to open a text file for importing as a new Table or Linked source, it fails with the message "there is no object in this control" Also, when I proceed to open the Linked Table Manager, it also fails with the same message. After some time thinking about, and how it might have happened (I initially thought that Office got corrupt) I came to the conclusion that this happened when I installed Delphi 11.2 Alexandria because it uses the new Edge Browser components/dll's, etc., and that had to get installed which it installed, I think. Either way, I have to keep that installed in order to use Delphi 11 and/or some of the components. They appear to be necessary, so I'm stuck. It appears that I have lost some functionality in Access, like the above-mentioned, which I need and use regularly. Note, I use MS Access every day on this laptop. Does anyone know about this and how I can resolve that error message to get Access working correctly again ?
  15. RESOLVED !! I resolved it by re-installing office 2010. I was searching around for the install repair feature because I thought it would have that feature but I couldn't find one. I had found old install directory still around and hit the setup.exe app. Went through the product key/activation process with success. The old link in the pop-up dialog box still works in this version. Anyway. The Import and Linked Table Manager features are now working again!
  16. Unfortunately, that test can not work because it's not a single .mdb / .accdb file, its all of them. Even new files I create suffer the same fate. It is definitely MS Access on this laptop.
  17. No form in my Access db. This occurs inside the IDE of Access. I've been using Access (office products) since 1998, and never had this problem. I have no clue exactly what could have caused it, in terms of files and things. I use Access every day, but I haven't the need to import since early November/2022. So, no way to track exactly when this occurred except that it had to be when I installed Delphi 11 in mid Nov/2022. Today, I needed to import a fresh text (csv) file and that's when I discovered the problem.
  18. I have a problem with this forum. Whenever I go into some forums, like the General Help section and try to start a new topic, I get residuals of a previous topics post. I cannot figure out how to resolve it. It just keeps posting the same info/text in the body section. Can an admin help me resolve this? I need to post a new topic and can't. Thank you. Please ignore the junk below, This is what keeps auto-filling in when I start a new topic. . . . . win7, d11.2, vcl, for/to loop for i:=0 to 10 step 2 do begin // ...process... // end; I use to do this in delphi 6 in various projects. I never had problems with it, and I need to use it again, but this time in Delphi 11 but it is not working. Same for XE7. I believe something has changed, maybe a compiler directive switch, you know, {$step on/off} or something. I know I can do it in other ways, but in this case its easier for me to visualize in my head the various things How do I turn it on?
  19. ha-harg!! I found it, the answer.., below. Now that I think about it, it was because I started a new topic on for/step/looping (because the STEP part was not working in XE7 and D11 -- I guess its no longer supported nor recommended) and then I decided not to post it because I found another way using a simple custom counter that worked for my needs. Anyway. Not sure how I ended that post. I thought I had clicked [cancel] or just closed the window, but can't remember now, and it doesn't matter. Just click on the clear editor link and it will clear the window. Problem solved! Thank you all for chiming in, appreciated.
  20. I'm trying really hard to figure this message out, but can't. What part of the TFDTable 'text must not be empty' that i need to fill in ? 1. I have a form with a memtable and stringgrid on left side of form. 2. Also have a dbgrid with (con, table, query, datasource) components on right side of form. 3. a button to [import] the data from the stringgrid into the dbgrid. Below, is code to import data into the FDTable. I am just trying to learn how to import data through this method. Not trying to do it another method or way. So, I want to know what is the meaning and solution to the 'text must not be empty' part. I don't know what text the message is refering to when i run this code and click on the [import] button, below... thanks. procedure TForm1.btnImportClick(Sender: TObject); begin // ftable.CopyDataSet(memtable, [coStructure, coRestart, coAppend]); end; solved... (partially) - see my posts below, I explained why it was happening and what I did to resolve it. -- 12/29/2022 Friday pm
  21. From time to time, I want to be able to quickly view/verify databases that I'm working on but from another app. In XE7, I have a db app that I created for sqlite databases. I drag the file.db to the app and it opens and displays the data, but i'm having trouble making that happen when I am in delphi d11 project and its giving me the 'database is locked' error. Even when I uncheck [ ] the 'Connected' setting in Object Inspector. I seem to recall a step to set the project's app to share or something like that but can't find it or the feature to allow an open database to be shared or opened (for viewing only) from another app. Is this still possible, and how ?
  22. The solution I found (through trial and error) through the steps below, works. In the fdquery->SQL I added the following: drop table if exists tblBarcodes; create table if not exists tblBarcodes ( IDNo integer, Barcode varchar(255), isle integer, LFRT varchar(2), Row integer, Type varchar(2), Date varchar(21), Desc varchar(255) ) In my form create section, I have this bit of code: var DATABASE_FILE: string; begin DATABASE_FILE := TPath.Combine(TPath.GetDocumentsPath, 'mydb.db'); DATABASE_FILE := 'f:\datasets\mydb.db'; // <-- rem this line out when compiling over to android. <-- Con.Params.Clear; Con.Params.Add('DriverID=SQLite'); Con.Params.Add('Database=' + DATABASE_FILE); //DATABASE_FILE); con.Params.Add('create database'+database_file); Con.ResourceOptions.DefaultParamType := ptOutput; Con.Connected := True; In my [import] tbutton, I have following code: procedure TForm1.btnImportClick(Sender: TObject); begin // import the database into the second grid for review. qry.Close; qry.data := mtable.Data; qry.open; end; Note, the second grid is a dbgrid. Once I convert this portion of code over to the FMX platform (and then Android) the grid will be a stringgrid. The left side grid is the scanned barcodes, the right side grid is the copied grid/contents from the left side grid. Thus, while I debug my actual mobile barcode scanner app (at my job site), I will be running various scanning tests. So, I will be creating and deleting a number of times the contents in the left side grid, and sometimes I may be import it to right side grid, and then posibly save it out to an sqlite db for further review. Note, I have not tested it for mobile. But I plan to soon.
  23. And, by the way, I found the solution, just before you posted before my previous post above.
  24. Not quite. The goal was to have a stringgrid and populate it with barcodes that I would scan with my smartphone (android). Then, if I need the data finalized (stored) then I would export it out to a sqlite database on the phone. But first, I would need to visualize the data in some similar grid. And if I like it, I would [save] to a sqlite db on the phone. I might want to edit the data before I export it out, so the second grid would serve that purpose. Yes, I know, I could and should do it in one table/grid but I will be doing a lot of what-ifs and not needing to export or update data in real-time. I feel, in my opinion, that this is my prefered route for this project, until I decide otherwise.., this will do.
×