Categories
Android iOS Mobile

A Tale of Two Grids

If you buy RAD Studio XE5, Delphi XE5 or C++Builder XE5 between now and the end of the year, then you get both the InfoPower XE5 VCL Grid and components, as well as the InfoPower XE4 FireMonkey grid! The InfoPower grid by Woll2Woll is one of the best grids for VCL application development, and has been for years. It is great to see the InfoPower grid now on FireMonkey. With these two grids your apps can have the best grid ever, on any platform we support: Windows, OS X, iOS and Android.

I made a little video showing some of the features. Also you can download the InfoPower grid demo for Android from the Google Play store. Install it on your Android device today and check out the potential.

Categories
Android iOS

My Favorite Quote from the XE5 Tour

I am just finishing up my last few stops on the RAD Studio XE5 tour. I’ve met lots of great developers, both existing Delphi developers, and many developers new to Delphi and Embarcadero’s tools. Everyone I talked to was excited about what they saw and the opportunities they knew XE5 would mean for them.

There was one guy in Vancouver who probably had the best comment. He was sitting the front row and as the presentation was going on I could see him getting kind of skeptical as he set there with his arms folded. The demos were flying left and right and everything was going great, so I wasn’t sure what he was skeptical about. Finally he raised his hand to ask a question.

“I’ve been using Google’s tool for Android development for a some time now, and I’m sitting here watching you make these demos, but I don’t see you writing much code. Are you hiding something from us or is it really this easy?”

I was a little surprised by his question. I showed him I wasn’t hiding anything and then explained that FireMonkey includes a lot of components that simplify common tasks. You still write code, but a lot of the busy work is taken care of for you. He responded that it was pretty incredible. The long time Delphi developers in the room who all smiled an nodded their head knowingly.

Sometimes, for those of us who have been using Delphi for years, we start taking some of the productivity benefits for granted, but for a lot of developers XE5 is introducing them to a whole new world of getting things done. This is a great time to upgrade to XE5 if you are new to Delphi, or have just been a away for a while . . .

  • Upgrade to XE5 from any earlier version (Upgrade price from any previous version)
  • Bonus pack with up to $1,150 in free software
  • Step Up to Ultimate Edition Free from Enterprise
  • Get a free C++Builder iOS upgrade when you buy qualifying C++Builder XE5 or RAD Studio XE5 tools

These deals expire the end of this month, December 31st. So treat yourself to a Christmas present and fill your new year with high productivity and true native apps on Windows, OS X, iOS and Android.

Categories
Android Conferences iOS Mobile

Sending a URL to Another App on Android and iOS with Delphi XE5

Here is the source code for my Open and View URL library from my CodeRage 8 session “Beyond the App”. Here is a download of the example app. I’ll see about posting it to a SVN repository too so it can grow and evolve. Thanks to Al Mannarino for his code that started this!

Note the code is using TidURL.URLEncode on all URLs. I found it is only required on the maps for iOS (iOS doesn’t like spaces) but may be causing trouble with the geo:// on Android.

Some example protocols

  • http, tel, sms, fb, mailto, twitter, geo, etc.

Example URLs

  • – Common to both iOS & Android –
  • http://www.embarcadero.com/
  • tel://(415)834-3131
  • sms://1234
  • http://twitter.com/coderage (This opens with the Twitter client on Android)
  • mailto://jim.mckeeth@embarcadero.com
  • twitter://user?screen_name=coderage
  • fb://profile/34960937498 (get the UID from http://graph.facebook.com/embarcaderotech or for whatever page you are looking for)
  • – iOS Specific –
  • http://maps.apple.com?q=5617 Scotts Valley Drive, Scotts Valley, CA 95066 (this needs the URL encode – Apple has some additional APIs that are recommended.)
  • – Android Only –
  • content://contacts/people/
  • content://contacts/people/1
  • geo://0,0?q=5617 Scotts Valley Drive, Scotts Valley, CA 95066
  • geo://46.191200, -122.194400 (I think this one doesn’t like the URLEncode)
unit OpenViewUrl;

interface

// URLEncode is performed on the URL
// so you need to format it   protocol://path
function OpenURL(const URL: string; const DisplayError: Boolean = False): Boolean;

implementation

uses
  IdURI, SysUtils, Classes, FMX.Dialogs,
{$IFDEF ANDROID}
  Androidapi.Helpers,
  FMX.Helpers.Android, Androidapi.JNI.GraphicsContentViewText,
  Androidapi.JNI.Net, Androidapi.JNI.JavaTypes;
{$ELSE}
{$IFDEF IOS}
  Macapi.Helpers, iOSapi.Foundation, FMX.Helpers.iOS;
{$ENDIF IOS}
{$ENDIF ANDROID}

function OpenURL(const URL: string; const DisplayError: Boolean = False): Boolean;
{$IFDEF ANDROID}
var
  Intent: JIntent;
begin
// There may be an issue with the geo: prefix and URLEncode.
// will need to research
  Intent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_VIEW,
    TJnet_Uri.JavaClass.parse(StringToJString(TIdURI.URLEncode(URL))));
  try
    SharedActivity.startActivity(Intent);
    exit(true);
  except
    on e: Exception do
    begin
      if DisplayError then ShowMessage('Error: ' + e.Message);
      exit(false);
    end;
  end;
end;
{$ELSE}
{$IFDEF IOS}
var
  NSU: NSUrl;
begin
  // iOS doesn't like spaces, so URL encode is important.
  NSU := StrToNSUrl(TIdURI.URLEncode(URL));
  if SharedApplication.canOpenURL(NSU) then
    exit(SharedApplication.openUrl(NSU))
  else
  begin
    if DisplayError then
      ShowMessage('Error: Opening "' + URL + '" not supported.');
    exit(false);
  end;
end;
{$ELSE}
begin
  raise Exception.Create('Not supported!');
end;
{$ENDIF IOS}
{$ENDIF ANDROID}

end.
Categories
Android iOS Mobile

Reading Barcodes with XE5 – Preliminary post

Fernando Rizotto has an example of using XE4 on iOS to read a barcode. He is using an iOS specific library. Another library that is available on both iOS and Android is OpenCV. It is a full open source computer vision library with a lot of great features, one of which is reading barcodes.

Categories
Android iOS Mobile

Blackberry is Still Ahead of Microsoft

When talking about Delphi XE5’s support for Android and iOS, someone usually asks if we plan to support Windows Phone, but never asks (that I’ve heard) if we plan to support Blackberry. In the news we keep hearing how Blackberry is struggling and losing market share, while Microsoft is fighting to gain market share. Interestingly Blackberry is still ahead of Microsoft.

Mobile Market Share

 

Looking at ComScore’s latest numbers we see Blackberry has 4.3% while Microsoft has 3.0%. Both are still in decline over the long haul. So even if Microsoft captured Blackberry’s 4.3% and Symbian’s 0.3% they would still only be at 7.6% compared to Android’s 51.8% and Apple’s 40.4%.

Microsoft has a way to go before they become a serious contender, and any other smartphone OS will be fighting an uphill battle to gain a foothold. With Microsoft’s deep pockets they could ride out a much longer storm than any upstart in this space, so I expect they are the only one who could turn up as an actual 3rd alternative.

Categories
Components iOS Mobile

TMS Pack for FireMonkey now supports XE5 and Android

TMS Pack for FireMonkeyVery exciting to see an update from TMS for their TMS Pack for FireMonkey with support for XE5 and Android (as well as iOS, OS X and Windows). Their pack includes a great diverse collection of controls for both mobile and desktop apps.