AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Pizza delphi12/11/2022 22-23 at the Sheraton, New Orleans.Īccording to a news release, the Insight Mobile Command Center app provides restaurant operators with the ability to remotely manage functionality of the Insight platform from any mobile device. The app will be on display at FSTEC from Sept. ![]() ![]() plans to introduce its new Insight Mobile Command Center smart app aimed at providing restaurant operators with real-time monitoring and control of drive-thru operational metrics. And, again, the same source code (with some UI differences) will work perfectly on all 4 platforms Delphi is about to support.Delphi Display Systems Inc. This is all it takes to consume and produce Azure data and blobs on your Android phone, using the support classes already available in the past few versions of Delphi. The output is a simple confirmation message: ShowMessage ('Your order for ' + Label2.Text + ' was sent') TableService.InsertEntity(orderstable, RowObj) RowObj.SetColumn (XML_PARTITION, IntToStr (OrderId)) RowObj.SetColumn (XML_ROWKEY, user_name) Procedure TForm4.SpeedButton2Click(Sender: TObject) This is the output on Android, with the description and the image of the selected pizza:Īt the bottom, there is an "order" button with the price, which is going to post a new record on a second azure table, inserting the location information (obtain from the sensor): In fact 99% of the code of this demo works across all four platforms. Notice the code for loading the image using a stream: That code works identically on Windows, Mac, iOS, and now Android. The main calls here are QueryEntity and GetBlob. Label3.Text := aRow.GetColumn('description').Value īlobService.GetBlob(tablename, aRow.GetColumn(XML_PARTITION).Value + '.jpg', memStream, '') SpeedButton2.Text := 'Order for ' + aRow.GetColumn('price').Value + '$' Label2.Text := aRow.GetColumn(XML_ROWKEY).Value ShowMessage ('About to get details for ' + AItem.Text +ĪRow := TableService.QueryEntity(tablename, Procedure TForm4.ListView1ItemClick(const Sender: TObject Notice how I keep the numeric partition key in the Tag of the list view items, since I need it later for getting the record and the images. This is the Android screen, after fetching the list of pizzas:Īs a user selects a pizza, the name and id are used to fetch the record data, the blob, and populate the second tab of the form: Item.Tag := StrToIntDef(aRow.GetColumn(XML_PARTITION).Value, 0) Item.Text := aRow.GetColumn(XML_ROWKEY).Value ![]() RowsList := TableService.QueryEntities(tablename) īuttonRefresh.Text := Format ('Found %d pizza(s)', ) ![]() Procedure TForm4.ButtonRefreshClick(Sender: TObject) The main form has a button to retrieve/refresh the list of pizzas: TableService := TAzureTableService.Create(AzureConnectionInfo1) īlobService := TAzureBlobService.Create(AzureConnectionInfo1) All I had to do was configure the AzureConnection component and add this to the OnCreate event handler: Notice that while on iOS i had to put in some extra effort for OpenSSL support, on Android this is part of the platform and there is no extra requirement. Yesterday, in a couple of hours I cleaned up the user interface a bit and built an Android app, with the new coming version of Delphi. Later I wrote an iOS client (in parallel to a desktop version for Windows and Mac, with very similar code), that let you retrieve the list, get details on one entry, and place an order (posting data to another Azure table), including the location (latitude and longitude) information taken from the device using the location sensor. Using a Delphi application similar to the one discussed in this article I wrote some time ago, I published a local database on Azure Tables, using Azure Blobs for the pictures of the various pizzas. Some time ago I published a simple database with a fake Pizza Shop menu on Azure.
0 Comments
Read More
Leave a Reply. |