Tuesday, January 24, 2012

Push Notification now available in Android Smart Device Generator.

In the GeneXus Smart Devices Generator, Push Notifications have been available for a while for iOS, and are now also available in Android.

Please check this article for an introduction to push notifications in GeneXus Smart Devices.

Android Push Notifications are based on the Android Cloud to Device Messaging (C2DM) technology and are available for all devices running Android 2.2 or higher that also have the Market application installed.

Using them from GeneXus is really simple, and is done by setting to True the “Enable Notifications” property in the Main object properties group. When doing this, a new set of properties is available (under the header “Notifications”):

You need to set the credentials for a GMail user that has been previously registered to use C2DM (see http://code.google.com/android/c2dm/signup.html). A typical user would be yourapp@gmail.com.

From now on, if you execute your GeneXus application in a Smart Device, a service called NotificationRegistrationHandler is executed in order to register the device information needed to send messages (AKA push notifications) to the device in the future. This information must be stored in your application’s database, and an example of a registration procedure is already included in your Knowledge Base. Every new device that uses your application will call this procedure with its own data.

With this information, you can start sending messages to registered devices (those that use your application) using the Call method in the Notification external object:

And that’s it. The messages sent will be shown as notifications in the Android device:



Now you are ready to use Push Notifications with Android. Enjoy!

Note: this feature is available in Android starting in build 52654 with C# and Java in the server side (see the night builds log). We will add Ruby option soon.

Friday, January 20, 2012

Share button in Image Gallery

We recently added a new property to the SD Image Gallery user control: Enable Share Action.

This property adds a button to the user interface that lets you select several images, and send them by e-mail.

Note: by now this feature is only available in the iOS generator (starting on build 52470, see the night builds log), but it will be added to Android and BlackBerry soon...

But before using this property, we need to have an image gallery... To do that, simply select the Grid item in the layout that you want to show as an image gallery, and set the Control Type to "SD Image Gallery". You also need to set the property Data Attribute with an image attribute that will be displayed in the user control.


If you want your users to be able to share the images by e-mail, just set the property Enable Share Action to True (default is False).

This is how it looks when you run the application in the iPhone:


The "Share" button is located on the upper right corner of the screen. When you tap it, it changes to "Done", and lets you select one or more images.


When you tap "Done", an e-mail composer window appears with the selected images attached.


That's it: as easy as setting a property in your control :)

If instead of being in the gallery view (where you see several thumbnails) you already selected an image, the "Share" button shows the e-mail composer window with that image attached.


Thursday, January 19, 2012

Welcome

Welcome!

In this blog, we'll be talking about the GeneXus for Smart Devices generator.

About GeneXus

GeneXus is a powerful, multi-platform software design and development tool that enables truly incremental development of business critical applications, generates 100% of the application based on your user requirements, providing programming-free, automatic maintenance of your application’s database and application programs, and supports the leading execution platforms and languages, and the most popular DBMS.

Learn more

About GeneXus X Evolution 2

There is a revolution around Smart Devices. A new kind of devices (phones, tables and other) getting more and more popular. This revolutionizes application development too, since new kinds of applications are running (and can be built) on these smart devices: Native Task (or Activity) Oriented applications and Consumer applications.

Consumers all over the world choose which smart device to buy and use. On the other side each smart devices manufacturer states its own user interface standards and development languages which makes application development for smart devices even more challenging.

GeneXus X Evolution 2 adds technology and a specific generator to target Smart Devices. Supported devices so far are the ones with Android, Blackberry and iOS (iPhone, iPad, iPod Touch).

Learn more