Using QueryLines to filter your BaaS data

Today I thought I would do a quick tutorial on how you can filter your BaaS data using TBackendQuery’s QueryLines feature. This allows you to filter your cloud data using regular expressions. For more information on regular expressions, click here.

If you have never used a Backend-as-a-Service provider like Kinvey, Parse or App42 and are looking to build BaaS enabled apps with 10 Seattle, I would recommend having a look at my tutorial series:

I created some sample data in a Kinvey data collection that consists of Recipe Categories and Recipe Titles. For more info on this demo, please see:


Using regular expressions, I am able to filter my results. Select TBackendQuery’s QueryLines field in the Object Inspector and click on “…”. Then type in your regular expression and click OK. Right-click on the BackendQuery component on your form and select “Execute”. You are now able to see the filtered results at design time.


Below are some sample queries.

Sample Query 1:

query={“$or”:[{“Category”:”Mexican”}, {“RecipeTitle”:{“$regex”: “^Tamales”}}]}  //search for recipes that are either in the Mexican food category or begin with “Tamales” in the title
limit=2    // limit number of results to just 2
skip=1    //skip the first result / exclude it from the list
sort={“RecipeTitle”:-1}   //display recipe titles in descending (Z-A) order

query={"$or":[{"Category":"Mexican"}, {"RecipeTitle":{"$regex": "^Tamales"}}]}




Sample Query 2:

query={“RecipeTitle”:{“$regex”: “^[SM]”}}  // recipe title starts with either “S” or  “M”
sort={“RecipeTitle”:-1}    // display recipe titles in descending (Z-A) order

query={"RecipeTitle":{"$regex": "^[SM]"}}



Sample Query 3:

query={“RecipeTitle”:{“$regex”: “^.*Salmon”}}  // recipe title includes the word “Salmon”
sort={“RecipeTitle”:-1}   // display recipe titles in descending (Z-A) order

query={"RecipeTitle":{"$regex": "^[SM]"}}



David I’s (@davidi99) Tweets of the Week – Nov 8-14, 2015

Client applications communicate with Analysis Services using XML for Analysis (XMLA) over TCP IP or HTTP.

CodeRage Session Replay on Windows 10 UI and UX:

Are you tracking and measuring how often apps are used and on which platforms they are running?

We are now offering smaller packages of EMS. Go ahead test it. Deploy it. See what EMS can do for you. 

New Chrome exploit puts all Android phones at risk

InterBase has been shortlisted for the 2nd annual IoTA awards for Most Innovative Use of Data!

Embarcadero Customer and Partner Welcome from IDERA:

Sign up for @michaelrblaha’s video course on doing #datawarehouse projects.

Business stakeholders using wrong data to make important decisions, says new @EmbarcaderoTech survey results

Buffett’s BYD Vs. Musk’s Tesla:  Electric Vehicle Race Still Undecided – Forbes

The FCC is Cracking Down on Hotels’ Wi-Fi Blocking – Fortune

IBM pumps up its hybrid-cloud muscle with Gravitant buy

Gene Amdahl, IBM mainframe architect then a rival, has died at age 92 –

Intel Puts $22M In 10 Startups, With A Stake In FreedomPop To Launch A Rival To Google’s Project Fi

Cop pulls over Google self-driving car, finds no driver to ticket – was driving too slow – no ticket given –

Google’s New AI Will Reply to Your Emails so You Don’t Have to – Fortune

Hey, Twitter Developers! Twitter Wants Your Product Feedback.

A new Star Trek series will premiere in 2017

Apple’s survey app helps venues easily create indoor maps

Aaron Levie Is Hyperloop and Other Good (Bad?) Halloween Costumes From the Tech World

Google X Drones Could Deliver You Something as Soon as 2017

Women From Apple’s Early Days Recall Working With Steve Jobs

VW’s new CEO under pressure as emissions scandal hits Porsche

RAD Studio, Delphi, C++ 10 Seattle – 5 Minute REST client challenge; How Fast is your Mobile & Desktop IDE?

DJI Wants To Build ‘Intelligent Flying Robots’ With Manifold Ubuntu-Based PC For Drones

Inside Facebook’s MemNets And The Drive To Bring Advanced AI To Everyday Tasks

In rare appearance, Larry Page discusses new Alphabet structure

Winner claimed in $1 million iOS 9 hacking contest

Skill Sprint: Android Services for Background Execution

Api.Ai – Free Speech-to-Text, Intent Recognition and NLP for IoT

It’s a Trap! Agile Lessons from Star Wars | Rally Software Blog

Rufus Cuff – the ‘tablet’ for your wrist has arrived – features a 3.2-inch screen

MIT Researchers Say Their Drones Can Safely Navigate Forests At 30 MPH

This Awesome Typeface Stretches Like a Rubber Band

New Imaging Technique Measures Chemical Composition of Cells in Living Tissue |

Google has plans for combining Android, Chrome OS—eventually – Fortune

The Best Pros Won’t Work For You, But You Can Still Engage Them

Nearly 70% of tech spending is wasted: Study

The Path To Expertise

Icontrol Developer Program Opens Door to New Level of Smart Home Customization

RAD Solution Pack:– the ultimate collection of VCL and FMX tools & components for Delphi and C++Builder.

Video: My Insanely Automated Home & Morning Routine | Automated Home

Q4 2015 Dev Skill Sprints starts today! (On every Tues) Code, tips, tricks, Windows 10, Android, & Much More!

Getting Started with the Google Cloud Platform

Lean Software Development – Building and Shipping Two Versions – ACM Queue

Controlling Augmented Reality in the Operating Room: A Surgeon’s Perspective |

Google slammed the brakes on its acquisition machine, with the lowest deal-making since 2009

Big data: the importance and impact on population health

The Most Nonsense Concepts From the Tokyo Motor Show

What Startups Need To Know About The Safe Harbor Ruling In Europe

A frame-by-frame analysis of the R2-D2 mini fridge trailer

Google Chrome Might Be Gone – The Monitor Daily

Great Scott! Data travels fast! @datachick shows you how to deal with new datatypes in this November 10 webinar

CodeRage Resources for C++ and Object Pascal Tracks. Source code, tutorials, etc. Now Includes YouTube Replay list

Beyond the BeaconFence

– take proximity beacons to the next level with precision location aware apps.


– Internet of Things – Embarcadero’s Solution for Mobile Application Development –

RAD Studio 10 Seattle, Delphi and C++Builder – App Tethering using Encryption Hooks

Verizon’s next big bet – they unveil a platform and IoT network to facilitate adoption of connected devices.

Less about automation more about personal augmentation. Less about devices and more about “living services”.

IoT is about to explode, perhaps literally, if privacy and security issues aren’t fixed.

Microsoft’s New App Improves on Google Android – arranges apps by use frequency –

Microsoft bows to Chrome’s dominance, delivers Office Online add-on for browser rival

“More Coding In Delphi” by Nick Hodges in More Formats – ePub & Mobi – Upgrade to RAD Studio 10 Seattle & download

New Delphi Seattle MongoDB Sample

Get Started with Xamarin 4 Today

Xamarin 4 is a fantastic release, designed to make building apps with Xamarin faster, easier, and more delightful than ever before, and the Xamarin Education team has worked incredibly hard to deliver the resources you need to get up and running with it. In both the documentation and Xamarin University teams, we have created a ton of new content as well as updated the existing content to be as fresh as the release. Be sure to check out the following resources to get started with Xamarin 4 today.

Get Up to Speed Quickly with Lightning Lectures

If you’re an experienced Xamarin developer, I recommend starting with our free Xamarin 4 Lightning Lectures from Xamarin University. They focus on quick overviews and introductions of new features:

  • iOS Apps in Visual Studio: Connect to your Mac to develop, build, debug, and deploy applications using our completely rebuilt support for developing iOS apps from Visual Studio
  • XIB Launch Screens: Easily support multiple iOS form factors with a XIB-based launch screen using the designer.
  • Introducing Xamarin Test Recorder: Greatly increase efficiency by creating automated UI tests visually with Xamarin Test Recorder.
  • tvOS with Xamarin: Apple’s tvOS is based on iOS, but has a number of key UI and framework differences. Learn about them and build the next killer tvOS app with Xamarin.
  • Creating iOS Extensions: Allow apps to create a rich inter-app experience by passing documents and context between them.
  • Android Material Design in Xamarin.Forms: Android Material Design is Google’s new design language and Xamarin.Forms now supports it.
  • Adding Insights to your Application: Xamarin 4 saw the public release of Xamarin Insights. Add it to your apps today with this quick walkthrough.

Xamarin University Lightning Lectures are completely free, but if you’re a Xamarin University subscriber, you’ve also got access to new Xamarin 4 classes, as well as updated content across the board to support the Xamarin 4 release.

Dive into Xamarin.Forms 2.0

Xamarin.Forms 2.0 included a number of cool new features and performance enhancements including:

Additionally, Xamarin University has over 15 hours of Xamarin.Forms content, and we’ve updated that content to cover all of the new features of Xamarin.Forms 2.0. Including:

Streamline Your iOS Experience in Visual Studio

Xamarin 4 takes a completely new approach to building iOS apps in Visual Studio with a Mac build machine. With our completely rewritten Visual Studio support, it’s faster, more secure, and easier to set-up and keep your build environment in sync. After you’ve checked out the Lightning Lecture, make sure to check out our new docs on it here.


Build Beautiful Apps with the iOS and Android Designers

Both the iOS and the Android designers have seen significant improvements in performance, as well as a slew of new features.

Xamarin’s Android Designer is faster, and includes new Material Design options to make building attractive Android apps even easier and more visual than before.

The iOS Designer now supports XIB files as well as Storyboards, meaning you can more easily share table and collection view cell layouts and create universal launch screens. We’ve created a recipe that walks through creating a XIB based launch screen, in addition to the lightning lecture mentioned above.

Finally, Xamarin.Mac got a big upgrade with its new support for storyboards via Xcode, enabling seamless synchronization between your C# code and the Xcode graphical UI designer.

Get Testing with Xamarin Test Cloud

Xamarin Test Cloud just got even better. Not only is there a new pricing model that makes it more accessible for everyone, we’ve also launched UITest 1.0, the first official release of our C#-based test authoring package that brings a familiar NUnit-like structure to your automated user interface test code.

Generate Tests Easily with Xamarin Test Recorder

To make it even easier to write tests, we’ve created the Xamarin Test Recorder, which enables you to generate automated UI tests visually.


Xamarin Test Recorder is an early preview tool that lets you build tests without any code at all—simply click through your app to build test cases, and watch Xamarin Test Recorder generate test code for you. You can then edit the test further or upload it straight to Xamarin Test Cloud! Check out the Lightning Lecture, and then dive into the documentation for more information.

If you’re signed up for Xamarin University, make sure to check out the updated Xamarin.UITest (XTC102) class, which now covers Xamarin Test Recorder.

Raise Your App IQ with Xamarin Insights

Xamarin Insights is a fantastic product that’s incredibly easy to add to your apps and can give you valuable insights into how people use them. Without doing any real work at all (simply adding it to your apps), you can track a lot of usage and metrics including app crashes and their cause. With a little more effort, you can build all kinds of useful events into tracking and really understand how people use your app, so you can optimize your development efforts. You can also automatically integrate events into 3rd party services such as GitHub and Visual Studio Online!

Check out the Quickstart guide or Lightning Lecture to get up and running quickly, or learn more about the product’s features in our expanded docs section.

Xamarin University students also have access to a brand new class, Using Xamarin Insights (XAM215) that teaches you everything you need to know to integrate Xamarin Insights into your Xamarin.Forms or native Xamarin application.

Happy Xamarining from the Xamarin Education Team!

The post Get Started with Xamarin 4 Today appeared first on Xamarin Blog.

Introducing Xamarin 4: Everything You Need to Build Great Apps

Today, we are extremely excited to introduce Xamarin 4, a complete mobile solution to help you build amazing mobile apps from start to finish.

Xamarin 4 is packed full of major enhancements to the Xamarin Platform and Xamarin Test Cloud, but today we’re also proud to announce the general availability of our real-time app monitoring service, Xamarin Insights.

Xamarin Mobile Development Lifecycle

The highlights of Xamarin 4 are covered below, but if you want to learn about more of the details and see some demos, please join me and James Montemagno on Friday November 20 for a webinar dedicated to what’s new in Xamarin 4.

Xamarin Platform – native, cross-platform apps

Xamarin.Forms 2.0

Since releasing Xamarin.Forms last year, we’ve been amazed at how quickly developers have adopted it, accelerating their time-to-market for cross-platform native experiences across iOS, Android, and Windows, all while sharing over 90% of their code.

Since then, we’ve more than doubled the engineering team behind Xamarin.Forms, and made major improvements along the way. Today, Xamarin.Forms 2.0 is faster, more reliable, and more functional than ever before. Highlights include support for pre-compiled screens defined in XAML for faster app loads, preview support for Universal Windows Platform apps, support for iOS 9, Android Material Design, and new gestures like pinch and pull-to-refresh.

Native Xamarin.Forms app displayed on iOS, Android, and Windows Phone devices

Visual Studio and iOS

We’ve rebuilt our support for developing iOS apps in Visual Studio from the ground up, and it’s smoother, easier to set up, and more reliable than ever before. Now you can develop, build, deploy and debug iOS apps entirely from within Visual Studio and communication with the Mac build host is now handled via a secure SSH connection. We now also support multiple concurrent Visual Studio instances, which is especially important if you have multiple iOS projects open at the same time. We think you’re going to love it.

Mono/.NET upgrade

In Xamarin 4, we have incorporated large portions from Microsoft’s open sourced .NET codebase into this release, increasing compatibility, performance, and reliability for all use cases.

Android and iOS Designers

We’ve made big improvements to our iOS and Android designers. The iOS designer can now load and save XIB files in addition to storyboard files, and our Android designer now supports Android Material Design. We have also improved the UI for both designers, and switched to using high-performance native design surfaces, for a smoother, faster editing experience.

Xamarin Test Cloud – automated app testing

We built Xamarin Test Cloud to allow you to easily test your app on more than 2,000 real iOS and Android devices in the cloud. With Xamarin 4, we’re making mobile testing more accessible than ever.

Introducing Xamarin Test Recorder

We’re introducing a new preview tool that makes mobile UI testing dead simple: Xamarin Test Recorder. Initially available for Mac, Xamarin Test Recorder records your interactions on iOS or Android apps, plays them back, and automatically creates test scripts that can immediately be run in Xamarin Test Cloud or imported into mobile test projects in Xamarin Studio and Visual Studio. Xamarin Test Recorder records your actions in our C#-based UITest framework so you can automatically execute them as part of your continuous integration process either locally or in the cloud. Download it now to get started.

Xamarin.UITest 1.0

Xamarin 4 includes the 1.0 release of the Xamarin.UITest C# testing framework, with new capabilities for advanced test scenarios. We’re also very happy to announce that Xamarin.UITest is now free for everyone to use, with no limits on test duration, or the use of local devices and simulators. The powerful combination and ease of use of Xamarin Test Recorder and Xamarin Test Cloud will help you immediately improve your apps.

Xamarin Insights – real-time app monitoring

General Availability

We’re proud to announce that starting today, Xamarin Insights is generally available, with free crash reporting for all Xamarin Platform customers and advanced app monitoring features for power users.

Know the Health of Your App, Know Your Users

App monitoring begins with knowing what problems your users are encountering. Is the app crashing or encountering exceptions or errors? Xamarin Insights provides automatic crash reporting and handles both managed and unmanaged mobile crashes seamlessly. You can also explicitly report errors or warnings to Xamarin Insights and track them through the its dashboard. Xamarin Insights makes it easy to rank your issues by impact, spot patterns in app and device usage, and diagnose the corresponding issues.

Xamarin Insights also helps you understand how your app is being used by tracking and timing step-by-step event data. Analyze which screens are the most popular or which actions take your users the longest. You can even see which events led up to a crash, making it easy to reproduce your issues.

You can add Xamarin Insights to your app with just a few lines of code. In Xamarin Studio, new apps immediately get the benefit of Xamarin Insights with templates that utilize the SDK from the very beginning of a mobile project. And your IDE will automatically upload dSYM files for you so that you get symbolicated stack traces with line numbers.

Visit our docs to get started.

End-to-End for Everyone

We think it’s important that every developer be able to benefit from the full range of what Xamarin 4 can do, which is why we’re excited to announce that as a part of their existing subscription, every active Xamarin subscriber will receive:

  • Crash and error reporting from Xamarin Insights with 30 day data retention and detailed issue reports that include step-by-step pre-crash events and crashed-user identification.
  • 60 Xamarin Test Cloud device minutes per month, with access to every single one of the devices in our growing test lab.
  • Complete access to Xamarin.UITest, including tests of unlimited duration running on simulator or device.
  • A 30-day trial pass to Xamarin University, including access to guest lectures and our introductory courses.

Paid Plans

As your business grows and your apps progress, you can buy paid plans of Xamarin Insights and Xamarin Test Cloud that suit your needs.

For companies who want to ramp up their mobile testing, we’re happy to introduce affordable Xamarin Test Cloud pricing plans starting at $99/month (billed annually). If you want to go further with app monitoring, we also provide scalable Xamarin Insights paid plans.

Xamarin Ultimate

Finally, for companies who want a complete end-to-end solution, we’re introducing a new offering called Xamarin Ultimate, which includes full access to all the features of Xamarin Platform, Test Cloud, Insights, and University for your entire team in a complete package at a great price. If you’re interested in learning more about this, please get in touch with our sales team at

Learn more this week

Join me this Friday, November 20 for a webinar overview about what’s new in Xamarin 4. Register for the time that best fits your schedule below:

Europe 1 pm GMT North America 11 am PT
Over the next few weeks we’ll also be doing individual deep-dive webinars on Xamarin Platform, Test Cloud, and Insights. We’ll post dates for these events on the blog in the near future.Lastly, if you’re new to Xamarin you can get started with a free trial now and explore what Xamarin Platform, Test Cloud, and Insights have to offer!

The post Introducing Xamarin 4: Everything You Need to Build Great Apps appeared first on Xamarin Blog.

Don’t delay: Try RC1 today!

Thanks to your participation in our new Release Candidate process, we’ve made some major improvements to our next major upcoming release, which includes our new and improved iOS integration in Visual Studio. We’re proud to share many of those improvements with you today in Release Candidate 1.

Visual Studio with iOS

RC1 has a significantly reduced number of known issues, so make sure you try it today. This may be your last chance to provide feedback on bugs or regressions that affect your workflow before our next major release.

Getting This Release Candidate

This release candidate (RC1) is comprised of updates on iOS, Android, Visual Studio, and Xamarin Studio. To use RC1 to develop iOS applications in Visual Studio, you will need to install RC1 on both your Mac and Windows workstations. You can try out RC1 by switching to the alpha update channels in Visual Studio and Xamarin Studio. Or, simply use our installers to get all of the new builds on Mac and Windows:

Download Release Candidate for Mac   Download Release Candidate for Windows
To help make this next release our best ever, please let us know about any issues you encounter with our new Visual Studio experience by filing a bug. You can learn more about known issues and major improvements in the RC1 release blog.The post Don’t delay: Try RC1 today! appeared first on Xamarin Blog.

Easily Authenticate Users with Android’s Confirm Credential

There are a number of ways to authenticate users on mobile devices, from traditional passwords and pins to new biometric fingerprint sensors. Most users are already using one of the most secure mobile authentication implementations, the device lock screen. With Android Marshmallow and the new Confirm Credential API, it’s now possible to utilize the lock screen to detect when the user last unlocked their device and even re-prompt them to confirm their identity without having to remember yet another app-specific password. All authentication is securely stored in a crypto key from the Android KeyStore with a customizable timeout period that’s carried across multiple applications.


Getting Started

It’s important to note that your user must have his or her lock screen already secured in Android’s settings before it’s possible to use the Confirm Credential API. Most Android users will have already done this, but it’s possible to check before even attempting by getting access to the KeyguardManager and prompting users to secure their lock screen:

//Create private KeyguardManager that will be used later on for Confirm Credentials
KeyguardManager keyguardManager;
protected override void OnCreate(Bundle bundle)
  //...Activity creation
  keyguardManager = (KeyguardManager)GetSystemService(Context.KeyguardService);
  if (!keyguardManager.IsKeyguardSecure)
    // Show a message that the user hasn't set up a lock screen.
    Toast.MakeText(this, "Secure lock screen isn't set up.\n"
                    + "Go to 'Settings -> Security -> Screen lock' to set up a lock screen",
    //We are free to create our Cyrpto Key

Creating Crypto Key

Once it’s verified that the user has set up a secure lock screen, it’s possible to attempt to create a crypto key with a specified timeout policy that’s used to see when the user last logged in. This timeout is set for a number of seconds, and developers are free to set it to any amount necessary for the app.

const string KeyName = "my_special_key";
void CreateKey()
  // Generate a key to decrypt payment credentials, tokens, etc.
  // This will most likely be a registration step for the user when they are setting up your app.
  var keyStore = KeyStore.GetInstance("AndroidKeyStore");
  var keyGenerator = KeyGenerator.GetInstance(KeyProperties.KeyAlgorithmAes, "AndroidKeyStore");
  // Set the alias of the entry in Android KeyStore where the key will appear
  // and the constrains (purposes) in the constructor of the Builder
  keyGenerator.Init(new KeyGenParameterSpec.Builder(KeyName, KeyStorePurpose.Decrypt | KeyStorePurpose.Encrypt)
                                           // Require that the user has unlocked in the last 30 seconds

Testing Last Unlock

When your code needs to authenticate the user, it simply needs to attempt to encrypt any data with the key that was created earlier. If the data can be encrypted with the key, then the user has logged in within our timeout period. If not, an UserNotAuthenticatedException is thrown and it’s time to confirm credentials. Here’s how to test encrypting a bit of data.

static readonly byte[] SecretData = new byte[] { 1, 2, 3, 4, 5, 6 };
void TryEncrypt()
    var keyStore = KeyStore.GetInstance("AndroidKeyStore");
    var secretKey = keyStore.GetKey(KeyName, null);
    var cipher = Cipher.GetInstance(KeyProperties.KeyAlgorithmAes + "/" + KeyProperties.BlockModeCbc + "/"  + KeyProperties.EncryptionPaddingPkcs7);
    cipher.Init(CipherMode.EncryptMode, secretKey);
    //attempt encrypting data
    // If the user has recently authenticated, you will reach here.
  catch (UserNotAuthenticatedException)
    // User is not authenticated, let's authenticate with device credentials.

Showing the Authentication Screen

If the user is already authenticated, the app can move on to a checkout screen or log the user in. Otherwise, it’s time to prompt the user to confirm their credentials by simply creating a new Confirm Device Credential Intent from the KeyguardManager.

static readonly int ConfirmRequestId = 1;
void ShowAuthenticationScreen()
  var intent = keyguardManager.CreateConfirmDeviceCredentialIntent((string)null, (string)null);
  if (intent != null)
    StartActivityForResult(intent, ConfirmRequestId);

Android will automatically launch the lock screen that the user has specified when the Confirm Credential Intent is activated, whether it be a pin, password, or any other type of security such as a fingerprint. Personally I use a pin on my devices, so here’s what it looks like on my Nexus 9 when the intent is launched:

Pin Screen

At this point the user can do one of two things:

  • Enter the correct credentials.
  • Cancel the unlock screen.

The Activity will get a callback with a return code when one of these occur, which can be checked if the correct credentials were entered.

protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
  if (requestCode == ConfirmRequestId)
    // Credentials entered successfully!
    if (resultCode == Result.Ok)
      // The user canceled or didn’t complete the lock screen
      // operation. Go to error/cancellation flow.

There you have it! No more passwords to remember, completely customized timeouts, and a workflow that’s familiar to your users.

Learn More

To learn more about getting started with Android Marshmallow, be sure to read through the getting started documentation. You can also find this sample and other Android Marshmallow samples on our Sample Gallery.

The post Easily Authenticate Users with Android’s Confirm Credential appeared first on Xamarin Blog.