There have been a couple of polls posted on the Google+ Delphi Developer Community by Stefan Glienke (Embarcadero MVP, blogger and developer of Delphi based software including DUnitX). Two of Stefan’s recent polls in the G+ Delphi community asked when members first started using Delphi and also how old they are. The polls were only for G+ Delphi Community members and not necessarily a representative sample of the global Delphi developer community. There was a comment in the developer age poll that wondered where Delphi developers are located. This prompted my to do one of my SQL queries of our registered customer database to see what the top countries look like. The following is the top 15 list of countries where Delphi developers registered their products.
Where are the Delphi Developers
The top 15 countries with Delphi developers (paid versions, NOT free or trial or pirated) are
- United States
- Great Britain
- South Africa
- South Korea
If your country is not in the top 15, download RAD Studio XE8, try it and then purchase it and maybe your country will move up the list. No matter where you live, you’ll find Delphi developers across the planet Earth. There are Delphi developers in 241 Countries and Principalities with top level Internet domain suffixes. We are still waiting for someone to register a Delphi product for .AC (Ascension Island, Saint Helena and Tristan da Cunha) and a couple of others!
posted @ Mon, 27 Apr 2015 21:05:42 +0000 by David Intersimone
With RAD Studio XE8, we support a range of backend as a service (BaaS) providers including Kinvey, Parse and App42.
Over the last year I have written many blog posts on our BaaS support and frequently get questions on BaaS from our customers. I recently got a question about how to upload files to Kinvey using https instead of http. Kinvey uses Google cloud storage for files and you can use either ‘http:’ or ‘https:’ when making a request to Google.
Below is some information from Kinvey’s website:
"By default, the upload and download URLs generated by Kinvey use the
http protocol to communicate with Google Cloud Storage. However, you may optionally request an
https URL using the
tls query parameter."
To use https instead of http when making a request to Google, you will need to modify the URLs we get from Kinvey to have an ‘https:’ prefix. This can be done by editing the REST.Backend.KinveyAPI source file found in source/data/rest/. I would recommend saving a copy of the file in the same folder as your project. Then add the file to your project in Delphi XE8, and select to use the unit.
Here are the changes you will need to make to the REST.Backend.KinveyAPI source file:
1. Add this routine somewhere in the source code to change the prefix:
function ForceHTTPS(const AURL: string): string; begin if AURL.StartsWith('http:') then Result := 'https:' + AURL.Substring(5) else Result := AURL; end;
2. Modify the URL for upload (in TKinveyApi.RetrieveFile):
LJSONValue := LResponseObject.GetValue('_uploadURL'); // Do not localize if LJSONValue <> nil then LUploadURL := LJSONValue.Value; Assert(LUploadURL <> ''); //Change to HTTPS LUploadURL := ForceHTTPS(LUploadURL);
3. Modify the URL for download (TKinveyAPI.RetrieveFile):
LResponse := FRequest.Response.JSONValue as TJSONObject; AFile := FileFromObject(LResponse); //Change to HTTPS AFile.FDownloadURL := ForceHTTPS(AFile.FDownloadURL); if Assigned(AJSON) then AJSON.AddElement(LResponse.Clone as TJSONObject); if Assigned(AProc) then AProc(AFile, LResponse); end
For instructions on how to create an image upload/download app using BaaS, please have a look at this blog post.
posted @ Mon, 27 Apr 2015 18:04:50 +0000 by sarinadupont
posted @ Thu, 23 Apr 2015 16:29:00 +0000 by Tim Del Chiaro
All notice a more modern look development environment (IDE) RAD Studio XE8.
Moreover, for the IT age, increasing the font size in the side panels and the source editor provides less eyestrain and quickly develop applications. On the other hand, the color scheme of the main menu and other elements of the IDE interface some professionals perceive aesthetically conservative close to Microsoft Office, two or three years ago. I have to run Delphi in different places, bringing on Wednesday monitors and devices of different resolution. Some of them no source or Property inspectors and do not fit on the screen. These parameters presentation, unfortunately, can not be adjusted in the standard configuration options environment, only fonts for source code.
It is necessary to create a text file … Continue reading
posted @ Thu, 23 Apr 2015 11:07:07 +0000 by Andrew Sovtsov
Included with the current RAD Studio XE8 offer is a new set of multi-device premium styles. One of those styles in the new Vapor style. This transparent style allows you to fully customize the look of your application by changing your form’s fill color.
Fill Kind: Bitmap
Fill Kind: Solid Color
Fill Kind: Gradient
The following Settings demo project was used to highlight the new Vapor style:
- C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\Object Pascal\Mobile Samples\User Interface\Settings Project
- C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\CPP\Mobile Samples\User Interface\Settings Project
XE8 customers can download the premium FireMonkey styles (including a readme with style setup instructions) here.
posted @ Tue, 21 Apr 2015 18:01:23 +0000 by sarinadupont
TImageList is a new FireMonkey component in RAD Studio XE8. Image lists can be used as centralized collections of images with many different UI controls such as menus, lists and more. TImageList has built-in support for multiple resolutions to ensure your application icons and images appear correctly on different device form factors, resolutions and platforms.
I created a small Restaurant Menu demo application that shows how to use TImageList with the TListView component.
In this example, TListView is bound into some sample data that I loaded to the FDMemTable component. The ImageList component is selected on the Images property for TListView. The ImageIndex field in the data set is bound into TListView’s ImageIndex property.
As you can see in the snippet below, ImageIndex="0" correlates with ‘Burgers’ in my list.
<RowList><Row RowID="0" RowState="Unchanged"> <Original FoodItemName="Burgers" ImageIndex="0"/>
To find out more about TImageList, have a look at these resources:
- Docwiki article on using TImageList
- YouTube video showing the feature in action
- RAD Studio XE8 ImageList demo project
Below is a screenshot of my application running on Windows with the new ‘Radiant’ premium FireMonkey style for RAD Studio XE8.
Want to learn more about the great new features in Delphi, C++Builder and RAD Studio XE8?
Download a free trial here and click on the banner below to sign up for our new Developer Skill Sprint series, starting next Tuesday, April 21st, 2015.
posted @ Fri, 17 Apr 2015 20:49:32 +0000 by sarinadupont
The new maps component in RAD Studio XE8 makes it easy to add mapping functionality to your mobile applications. TMapView provides access to map APIs for iOS and Android. On Android, it uses the Google Maps Android API and on iOS, it uses the Map Kit Framework.
The key features of the TMapView component are:
- Four Types of Maps: Normal, Satellite, Hybrid and Terrain (Android only)
- Gesture Control: Intuitive tilt, rotate and zoom gesture controls
- Control the Map View: Ability to control the map properties such as the map center coordinates, the map orientation and so on
- Custom markers: Ability to add markers to the maps
If you are using TMapView on Android, you will need to obtain a Google Maps API key.
RAD Studio XE8 ships with two maps sample applications for Object Pascal and C++.
- C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\Object Pascal\Mobile Samples\Device Sensors and Services\Maps
- C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\Object Pascal\Mobile Samples\Device Sensors and Services\Map Type Selector
- C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\CPP\Mobile Samples\Device Sensors and Services\Maps
- C:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\CPP\Mobile Samples\Device Sensors and Services\Map Type Selector
I created a small demo project that uses the Spitcast REST API, REST component framework, FDMemTable and TMapView to display surf locations on my map based on the longitude, latitude and spot name information returned from the REST service. A custom marker graphic in the shape of a surfboard fin is used to indicate the locations on the map.
You can download my demo project here.
Here is a code snippet from the demo project:
procedure TForm26.FormCreate(Sender: TObject); var LongitudeField: TField; LatitudeField: TField; MyLocation: TMapCoordinate; Descr: TMapMarkerDescriptor; SpotName : TField; begin RESTRequest1.Execute; begin LongitudeField := FDMemtable1.FieldByName('longitude'); LatitudeField := FDMemtable1.FieldByName('latitude'); SpotName := FDMemTable1.FieldByName('spot_name'); FDMemTable1.First; while not FDMemTable1.EOF do begin MyLocation := TMapCoordinate.Create(StrToFloat(LatitudeField.AsWideString),StrToFloat(LongitudeField.AsWideString)); MapView1.Location := MyLocation; Descr := TMapMarkerDescriptor.Create(MyLocation, SpotName.AsWideString); Descr.Icon := BitmapSource.Bitmap; BitmapSource.Visible := True; Descr.Draggable := True; MapView1.AddMarker(Descr); MapView1.Zoom := 8; FDMemTable1.Next; end; end; end;
Here is the app running on my iPad:
posted @ Thu, 16 Apr 2015 17:15:07 +0000 by sarinadupont
posted @ Thu, 16 Apr 2015 11:25:00 +0000 by Tim Del Chiaro
Продолжим рассмотрение нового подхода разработки (1 часть, 2 часть) и в этой статье рассмотрим использование нативных контролов на базе механизма презентаций для iOS. В качестве примера мы превратим TSpinBox в нативный для iOS.
Полная статья доступна здесь
posted @ Wed, 15 Apr 2015 12:25:28 +0000 by Yaroslav Brovin
A beacon is a Bluetooth Low Energy device including some information in its advertising data.
Working with beacons requires code to read the beacons and some setup to ensure you read only the right beacons, especially as more and more are appearing! This article mainly focuses on the latter and what you should be aware of before you deploy your beacons.
Programming for iBeacons & AltBeacons
While you can code to work with beacons via a number of languages, RAD Studio XE8 has introduces a new multi-platform component for working with beacons – as covered in this post from Sarina DuPont – this is very cool making it super easy to have both Android and iOS and Mac applications running from common code. However this is out of the scope of this post.
I will however point you to the sample projects shipped with RAD Studio XE8 using both Delphi and C++ in the following samples folder which can be opened directly using the shortcut to the samples in the IDE.
There is also great detail about what beacons are in DocWiki
<Samples>\<language>\Mobile Samples\Device Sensors and Services\Bluetooth\Beacons
Getting started with Beacon Hardware
So what do I need to know about beacons?
Firstly, beacons are typically following 2 standards for broadcasting over Bluetooth 4.
Using these standards you can pick up data to identify a specific beacon and how far it is away. The 4 key bits of information to manage this are
Using the new Beacons component you can define which type of beacon(s) you want to scan for using the UUID as a filter, and optionally Major and Minor ID – and this brings us onto the importance of the UUID
By default the UUID is set based on the beacon manufacturer. If you are going to use beacons in a real world application then you will probably want to update the UUID to a unique ID that you will be scanning for. This way you can limit any other beacons that are deployed.
Beacon Major and Minor
Beacon Major and Minor ID’s are used to identify the specific location you want to indicate with the Beacon. Hence its important that you update the UUID so you read only the correct beacons to check for the location you are at.
An example would be using the major to identify a retail store and a minor to a specific area in the retail store.
Programming the Beacon
There are a number of beacon manufacturers out there, and its typically easy to re-program your beacon to have that unique UUID and then set the Major and Minor ID’s.
Once such beacon is the RadBeacon from Radius Networks
Radius Networks provide a useful Beacon config application that you can download for free (once you register)
The default pin for editing the beacons is 0000.
Requirements for the Config App
For the software requirements visit the Beacon config application home page. In short, Bluetooth 4 is a minimum and Mac (10.9+) or recent iOS / Android releases.
Securing your Beacons….
Before you deploy your beacons, you may want to secure your beacon from tampering.
It is suggested by Radius networks that you lock your beacon before its put into a live environment. Locking a beacon prevents any further editing over bluetooth, so you need to be sure of your config before you do this.
A little less radical is updating the pin code for editing the beacon, however this is easily cracked so really only ideal for short term setup.
More about what the different options on the config application do are available here: http://www.radiusnetworks.com/ibeacon/radbeacon/mac/2-0-0/help.html
posted @ Sat, 11 Apr 2015 10:40:01 +0000 by Stephen Ball