SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
GeneXus Salto Lab
“Developing Smart Devices applications”
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 2
Copyright 1988 - 2015| Artech Consultores S. R. L.
All rights reserved. This document may not be reproduced in any form without the express permission of Artech
Consultores S.R.L. The information contained herein is only for personal use.
Registered Trademarks
Artech and GeneXus are registered trademarks of Artech Consultores S.R.L. All other trademarks mentioned in
this document are property of their respective owners.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 3
Table of contents
Aim ......................................................................................................................................................... 4
Preparation............................................................................................................................................. 4
Creating the Knowledge Base......................................................................................................... 4
Step 1 - Web Application and Initial Data Upload.................................................................................. 7
Step 2 – Applying Patterns and Creating Dashboard ........................................................................... 10
Application of the Work With Pattern for Smart Devices................................................................ 10
Creating the Dashboard ................................................................................................................... 11
Running the application on Android ................................................................................................ 13
Step 3 – Adding Design......................................................................................................................... 15
Annex 1 – Running on the Device (Android) (Optional)....................................................................... 19
Annex 2 – Multiple Layouts per Row (Optional) .................................................................................. 20
Annex 3 – SD Image Gallery (Optional)................................................................................................ 22
Thank you for participating!................................................................................................................. 25
Glossary................................................................................................................................................ 25
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 4
Aim
In this Lab, you will be provided with a step-by-step guide for the construction of a simple
application for Smart Devices, using GeneXus Salto version. The aim of this laboratory, however, is
not training but familiarization with the simplicity of the development of applications for smart
devices with GeneXus.
Preparation
For this laboratory we will use GeneXus Salto version. You will find the icon to run it in the desktop
with the name GeneXus Salto SD.
We will also use SQL Server to handle the database of the application, and Android SDK, which has
also been previously installed. We will also use Genymotion to emulate an Android device, which
should already be running.
Creating the Knowledge Base
We will start creating the Knowledge Base with the following configuration:
 Name = “LabSD<UserNumber>” UserNumber is written on the computer.
 Directory = C:Models
 Prototyping Environment = C# Environment
 Under Advanced, set Server = “Lab<UserNumber>”, then check “Use Windows NT
integrated Security”
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 5
We will now import objects from the web application which we will use as basis for our Smart Devices
application. Now open Knowledge Manager>Import, click on the Navigation button […] and select
GX25LabSD.xpz (Located under LabSD folder on the Desktop). We then click on Import>>.
You will see an exemplary KB, reduced for the specific purposes of this laboratory. This KB will contain
a Web application, which we will take as a starting point to create our Smart Devices version of it.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 6
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 7
Step 1 - Web Application and Initial Data Upload
This will be the home page we will find when opening the KB named "GeneXusMeetingLabSD"+ User
Number in GeneXus. Let's go over its different parts before going any further.
1. Toolbar: It provides access to all the GeneXus Knowledge Base options.
2. Knowledge Base Navigator: It is a set of contextual menus to browse on objects, whether in its view
by folders (Folder View), categories (Category View), or also to view the list of latest changes (Latest
Changes View) and Model Properties (Preferences).
3. Main: This is where the Start Page and one tab for each of the Objects opened unfold.
4. Properties and toolbox: for controls, objects and selected variables.
5. Output: for different operations (specification, generation, compiling, etc.).
As we can see on the Folder View of the Knowledge Base Navigator, we have a pre-loaded application
which, as we have already mentioned, is only implemented as a Web application, and our job will be
to create its version for Smart Devices. Now we will execute the Web version to see what it is all about.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 8
In this lab, we will run our application on the cloud. In order to do so, we will set the following .Net
Generator Properties in Preferences (in the Knowledge Base Navigator):
 Deploy to cloud = Yes
 Deploy Virtual Directory = LABSD<GXtechnicalUser>
 Deploy Server URL = http://apps5.genexus.com
Also, set the Data Store properties:
 Database name = LABSD<GXtechnicalUser>
 Server Name = apps5.genexus.com
After doing this, we select Run (Build > Run Developer Menu) for the application.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 9
A home page like the one below will be displayed in the browser:
We click on the Home link, which will take us to the home page for Web:
We will then create a simple Smart Devices version of this Web model. Feel free to take a look at the
Web application for a moment, if you wish to do so.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 10
Step 2 – Applying Patterns and Creating Dashboard
We have 3 Transactions: Country, Speaker, and Session, which currently have the Work With Web
pattern applied to them.
Application of the Work With Pattern for Smart Devices
We proceed to apply the pattern for Smart Devices.
We double click on the Country transaction (within the Root Module > Transactions folder). A tab will
open to work with that transaction. On the lower part of the screen we will see the following task bar:
We then select the Patterns option. The following will then be displayed:
First, we will select the tab that corresponds to the Work With for Smart Devices pattern, and then
we will click on the option Apply this pattern on save.
Finally, we will save our changes with the Save button and repeat the process for the other
two transactions. Note that in the Folder View under the node of each Transaction the objects created
by the pattern that corresponds to each of them will appear.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 11
Creating the Dashboard
We will now create a Dashboard object, which will be the starting point for our Smart Devices
application. To do so, we will select (on the ToolBar) File > New > Object (or using the shortcut Ctrl +
N).
We will select the Dashboard object from the object list and we will name it. For this example, we will
use GeneXusMeeting. We will then press the Create button.
We already have the starting point for our application, now we only need to add the corresponding
entries to the Dashboard in order to execute the WorkWithSmartDevices we have previously created
on our transactions.
To do so, we right click on the Items node in the Dashboard we have created and add a new Action
(Add>Action), as shown in the following image:
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 12
An object selection dialogue will appear, in which we will need to look for the WorkWithDevices for
the three transactions we have created, and add them one by one. Then we save the changes with
the Save button.
After adding the three WorkWithDevices, our Dashboard should look like this:
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 13
We are now ready to run our application on Android. For this, we only need to specify Dashboard
GeneXusMeeting will be the starting point of the application. This can be done through the Startup
Object property in the .Net Environment.
Running the application on Android
Having done this, we can run our application by clicking Run (F5). An instance of the application will
run on the Android Emulator. Loading of the emulator may take a few minutes, it is recommended
not to close it during the laboratory.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 14
In the emulator, we load the Startup Object we had configured previously: the GeneXusMeeting
Dashboard.
We will then see the three input options for our application (Country, Speaker and Session) which are
the ones we added as Actions on the Dashboard.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 15
Get to know the Emulator:
- See the list of Speakers and tap on any given person.
- You will see his or her information (for example, name, photo, ID, etc.).
- Select the "back" button to go back to the home page.
Tip: Do not close the Emulator. This way you’ll avoid the emulator reopening every time
you execute the application
Step 3 – Adding Design
We will now add some design, so that our application looks better.
In order to do this, we will go back to the Dashboard and select the action corresponding to Country
and, on its properties, we will change the way in which it shows its description and image, as follows:
We do the same for the other two Actions in the Dashboard: Session and Speaker.
Keep in mind that for the property Image we will use images that have been pre-loaded to the KB,
named: CountriesSD, SpeakersSD and SessionsSD, and we add them as follows:
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 16
Now let’s open WorkWithDevicesSpeakers object. We will now change the information shown on the
List for WorkWithDevicesSpeakers. We replace SpeakerName for SpeakerFullName and we add
CountryName right under the previous to show the Speaker’s country. When adding an attribute the
Label is added displaying the name of the attribute. To remove them we will set Label Position
property to None.
To improve the looks will make the Speaker’s photo to fill both rows. We Access the Image properties
and set Row Span to 2.
Now, to further improve the looks of our application, we will insert a Launch Image to be shown
when the application starts. We will also add a new icon and title.
In order to change the title, we will click on the Dashboard node, and on the Title property we will
modify and set Lab SD as shown in the image:
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 17
Then, to add a new icon and launch image, we will click on the Dashboard object in the Folder View
and we will modify the properties: Android Application Icon and Android Portrait Launch Image, as
shown on the following image:
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 18
Finally, we select Rebuild All and run the application to see the changes we have generated:
(F5).
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 19
Annex 1 – Running on the Device (Android) (Optional)
If you have an Android device, you can also install the application on it. The steps to follow are these:
Go back to the IDE on GeneXus, and go to the ToolBar: View > Show QR Codes. This will display the
browser with the following content:
All we have to do now is simply read the QR code that has been generated for Android with
our device and the .apk file generated by GeneXus will automatically start downloading in
order to install the application.
Note: You must allow the installation of applications from unknown sources. This can be
usually enabled on the security section of the Settings menu.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 20
Annex 2 – Multiple Layouts per Row (Optional)
The aim is that when a user taps on a Speaker on the List, instead of directly showing the detailed
information of the Speaker, this particular line expands, showing the CV there.
Solution:
We access List section for WorkWithDevicesSpeaker. Click on the upper right corner of the Grid and
select Add New Item Layout which we will define with the name "Select".
On this new layout, insert the SpeakerCVMini attribute right under SpeakerImage, and set Label
Position = None and Col Span = 3 so it will fill 3 columns.
For the Grid we will also modify properties Default Selected Item Layout as Select and Default Action
= <none>.
Now for the table located inside de Grid set Columns Style = 64dip; 85%; 15%
To view more details, the user must tap on the image of an arrow pointing to the right (arrow_right).
What do we have to do to achieve this behavior?
Solution:
Step 1
We open the Select layout and drag an Image control to the right of SpeakerFullName. Search and
select arrow_right image. On the Image properties set Row Span = 2.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 21
Step 2
Right click on the SpeakerImage attribute and select Go to Event > Tap, on the associated event, to
insert the following code line (this will take us to the Speaker details):
WorkWithDevicesSpeaker.Speaker.Detail(SpeakerId)
To finalize, we execute the application to see the changes added: (F5).
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 22
Annex 3 – SD Image Gallery (Optional)
We will create a new Panel for Smart Devices type object. We will then go to: File > New > Object and
create that object with the name: ImageGalleryCountry.
Once created, on the ToolBox toolbar we will create a Grid in the layout. To do so, Drag & Drop the
Grid option on our panel layout, and a dialogue will appear to specify which attribute/variable we will
insert in the Grid.
Select CountryFlag and then press the OK button.
We will then see the Grid we created, with the attribute inside of it. We can now indicate that we
want to show that grid as an image gallery. In order to do this, click on the Grid and go to its properties.
We will change the properties:
 Control Type = SD Image Gallery
 Data Attribute = CountryFlag
 Grid Behavior = Show Full Image
 Enable Share Action = True
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 23
Step 1
We will associate this event within the WorkWithDevicesCountry so that we can invoke it. To do so,
we will open the List and drag from the Toolbox a Button and drop it into the Application Bar. We
will name it “CountryFlags”.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 24
Step 2
Double click on the button, or right click> Go To Event, it will send us to the event that is associated
to that button. Here we will call the panel we have just created with the following code:
Event 'CountryFlags'
ImageGalleryCountry.Call()
Endevent
Finally, we run a Rebuild All and then execute the application to see the added changes: (F5).
In order to visualize the panel we have previously created, click on the menu button of the emulator,
which will show the button that will invoke that panel.
Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 25
Thank you for participating!
Glossary
My First Android Application
http://wiki.genexus.com/commwiki/servlet/hwikibypageid?14555
Applying Work With Pattern for Smart Devices
http://wiki.genexus.com/commwiki/servlet/hwikibypageid?15975
Multiple Layouts per Row
http://wiki.genexus.com/commwiki/servlet/hwikibypageid?22545
Using SD Image Gallery Control
http://wiki.genexus.com/commwiki/servlet/hwikibypageid?15308

Mais conteúdo relacionado

Destaque

Destaque (20)

Going mobile - Ignacio Roqueta
Going mobile - Ignacio RoquetaGoing mobile - Ignacio Roqueta
Going mobile - Ignacio Roqueta
 
Fútbol con GeneXus: De 0 a 1.000.000 de usuarios - Gonzalo Gallotti
Fútbol con GeneXus: De 0 a 1.000.000 de usuarios - Gonzalo GallottiFútbol con GeneXus: De 0 a 1.000.000 de usuarios - Gonzalo Gallotti
Fútbol con GeneXus: De 0 a 1.000.000 de usuarios - Gonzalo Gallotti
 
Recorriendo el camino hacia el paradigma de SAAS: La nube como habilitador - ...
Recorriendo el camino hacia el paradigma de SAAS: La nube como habilitador - ...Recorriendo el camino hacia el paradigma de SAAS: La nube como habilitador - ...
Recorriendo el camino hacia el paradigma de SAAS: La nube como habilitador - ...
 
Recursos GeneXus para la UX de aplicaciones SD - Sebastián Del Río
Recursos GeneXus para la UX de aplicaciones SD - Sebastián Del RíoRecursos GeneXus para la UX de aplicaciones SD - Sebastián Del Río
Recursos GeneXus para la UX de aplicaciones SD - Sebastián Del Río
 
Tecnología para la inclusión
Tecnología para la inclusiónTecnología para la inclusión
Tecnología para la inclusión
 
Building an Artificial Intelligence mobile application with GeneXus - Angelo ...
Building an Artificial Intelligence mobile application with GeneXus - Angelo ...Building an Artificial Intelligence mobile application with GeneXus - Angelo ...
Building an Artificial Intelligence mobile application with GeneXus - Angelo ...
 
SD+: Cree Apps más atractivas reduciendo los tiempos y costos de trabajo - So...
SD+: Cree Apps más atractivas reduciendo los tiempos y costos de trabajo - So...SD+: Cree Apps más atractivas reduciendo los tiempos y costos de trabajo - So...
SD+: Cree Apps más atractivas reduciendo los tiempos y costos de trabajo - So...
 
Live Editing en acción. What's next? - Federico Azzato
Live Editing en acción. What's next? - Federico AzzatoLive Editing en acción. What's next? - Federico Azzato
Live Editing en acción. What's next? - Federico Azzato
 
What's Next for Android and GeneXus - Matías Hernandez
What's Next for Android and GeneXus - Matías HernandezWhat's Next for Android and GeneXus - Matías Hernandez
What's Next for Android and GeneXus - Matías Hernandez
 
SD Designer, la nueva solución mobile de K2B Tools - Ignacio Tisnés
SD Designer, la nueva solución mobile de K2B Tools - Ignacio TisnésSD Designer, la nueva solución mobile de K2B Tools - Ignacio Tisnés
SD Designer, la nueva solución mobile de K2B Tools - Ignacio Tisnés
 
Apple no solo es iOS: watchOS & tvOS - Fabián Inthamoussu
Apple no solo es iOS: watchOS & tvOS - Fabián InthamoussuApple no solo es iOS: watchOS & tvOS - Fabián Inthamoussu
Apple no solo es iOS: watchOS & tvOS - Fabián Inthamoussu
 
Usabilidad en História Clínica Oncológica (HCEO) - Matías Garay Pocholo
Usabilidad en História Clínica Oncológica (HCEO) - Matías Garay PocholoUsabilidad en História Clínica Oncológica (HCEO) - Matías Garay Pocholo
Usabilidad en História Clínica Oncológica (HCEO) - Matías Garay Pocholo
 
AppsIn5: la fábrica automática de aplicaciones - Alejandro Silva
AppsIn5: la fábrica automática de aplicaciones - Alejandro SilvaAppsIn5: la fábrica automática de aplicaciones - Alejandro Silva
AppsIn5: la fábrica automática de aplicaciones - Alejandro Silva
 
Apoyando la construcción de aplicaciones seguras con K2B Tools - Federico Dom...
Apoyando la construcción de aplicaciones seguras con K2B Tools - Federico Dom...Apoyando la construcción de aplicaciones seguras con K2B Tools - Federico Dom...
Apoyando la construcción de aplicaciones seguras con K2B Tools - Federico Dom...
 
UX Design Process: Presente y Futuro - Alfonso Falconi
UX Design Process: Presente y Futuro - Alfonso FalconiUX Design Process: Presente y Futuro - Alfonso Falconi
UX Design Process: Presente y Futuro - Alfonso Falconi
 
iOS 9: qué hay de nuevo en la plataforma - Marcos Crispino
iOS 9: qué hay de nuevo en la plataforma - Marcos CrispinoiOS 9: qué hay de nuevo en la plataforma - Marcos Crispino
iOS 9: qué hay de nuevo en la plataforma - Marcos Crispino
 
Desarrolla Apps más fácil y rápido, GeneXus Evo 3 - Jaime Zilberberg
Desarrolla Apps más fácil y rápido, GeneXus Evo 3 - Jaime ZilberbergDesarrolla Apps más fácil y rápido, GeneXus Evo 3 - Jaime Zilberberg
Desarrolla Apps más fácil y rápido, GeneXus Evo 3 - Jaime Zilberberg
 
GeneXus Apps UI / UX Kit - Gabriel Simonet
GeneXus Apps UI / UX Kit - Gabriel SimonetGeneXus Apps UI / UX Kit - Gabriel Simonet
GeneXus Apps UI / UX Kit - Gabriel Simonet
 
El diseño visual revoluciona las apps - Belén Olivera
El diseño visual revoluciona las apps - Belén OliveraEl diseño visual revoluciona las apps - Belén Olivera
El diseño visual revoluciona las apps - Belén Olivera
 
T2VIDEO y el lenguaje gestual. De los conceptos a las aplicaciones GX - Claud...
T2VIDEO y el lenguaje gestual. De los conceptos a las aplicaciones GX - Claud...T2VIDEO y el lenguaje gestual. De los conceptos a las aplicaciones GX - Claud...
T2VIDEO y el lenguaje gestual. De los conceptos a las aplicaciones GX - Claud...
 

Semelhante a Laboratorio: Desarrollo para Smart Devices

Google Chrome DevTools for Mobile Screencast and Emulation
Google Chrome DevTools for Mobile Screencast and EmulationGoogle Chrome DevTools for Mobile Screencast and Emulation
Google Chrome DevTools for Mobile Screencast and Emulation
Anshul Mehta
 
iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1
Shyamala Prayaga
 

Semelhante a Laboratorio: Desarrollo para Smart Devices (20)

Laboratorio: Desarrollo para Smart Devices (continuación)
Laboratorio: Desarrollo para Smart Devices (continuación)Laboratorio: Desarrollo para Smart Devices (continuación)
Laboratorio: Desarrollo para Smart Devices (continuación)
 
Laboratorio: Desarrollo de aplicaciones Web con GeneXus Evolution 3 y Salto (...
Laboratorio: Desarrollo de aplicaciones Web con GeneXus Evolution 3 y Salto (...Laboratorio: Desarrollo de aplicaciones Web con GeneXus Evolution 3 y Salto (...
Laboratorio: Desarrollo de aplicaciones Web con GeneXus Evolution 3 y Salto (...
 
Sencha Touch MVC
Sencha Touch MVCSencha Touch MVC
Sencha Touch MVC
 
Vb.net ide
Vb.net ideVb.net ide
Vb.net ide
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hours
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Android by Swecha
Android by SwechaAndroid by Swecha
Android by Swecha
 
Cross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha TouchCross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha Touch
 
Android Programing Course Material Labs
Android Programing Course Material LabsAndroid Programing Course Material Labs
Android Programing Course Material Labs
 
OpenWhisk Lab
OpenWhisk Lab OpenWhisk Lab
OpenWhisk Lab
 
Build your first android mobile app
Build your first android mobile appBuild your first android mobile app
Build your first android mobile app
 
Sencha touch
Sencha touchSencha touch
Sencha touch
 
MonkeyTalk Documentation
MonkeyTalk DocumentationMonkeyTalk Documentation
MonkeyTalk Documentation
 
Mobile Worshop Lab guide
Mobile Worshop Lab guideMobile Worshop Lab guide
Mobile Worshop Lab guide
 
Vb%20 tutorial
Vb%20 tutorialVb%20 tutorial
Vb%20 tutorial
 
Google chrome dev tools for mobile screencast and emulation
Google chrome dev tools for mobile screencast and emulationGoogle chrome dev tools for mobile screencast and emulation
Google chrome dev tools for mobile screencast and emulation
 
Google Chrome DevTools for Mobile Screencast and Emulation
Google Chrome DevTools for Mobile Screencast and EmulationGoogle Chrome DevTools for Mobile Screencast and Emulation
Google Chrome DevTools for Mobile Screencast and Emulation
 
iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1
 
The Evolution Of Eclipse 1. 1 )
The Evolution Of Eclipse 1. 1 )The Evolution Of Eclipse 1. 1 )
The Evolution Of Eclipse 1. 1 )
 
UIAutomator
UIAutomatorUIAutomator
UIAutomator
 

Mais de GeneXus

Mais de GeneXus (20)

After Chatbots Yo (Ro) Bots
After Chatbots Yo (Ro) BotsAfter Chatbots Yo (Ro) Bots
After Chatbots Yo (Ro) Bots
 
Construya las aplicaciones del futuro ¡hoy!
Construya las aplicaciones del futuro ¡hoy!Construya las aplicaciones del futuro ¡hoy!
Construya las aplicaciones del futuro ¡hoy!
 
Live Editing in Action
Live Editing in ActionLive Editing in Action
Live Editing in Action
 
Experiencias en el desarrollo de aplicaciones móviles en el sector salud de M...
Experiencias en el desarrollo de aplicaciones móviles en el sector salud de M...Experiencias en el desarrollo de aplicaciones móviles en el sector salud de M...
Experiencias en el desarrollo de aplicaciones móviles en el sector salud de M...
 
¿Pensando en implementar un sistema de gestión integral en su organización?
¿Pensando en implementar un sistema de gestión integral en su organización?¿Pensando en implementar un sistema de gestión integral en su organización?
¿Pensando en implementar un sistema de gestión integral en su organización?
 
K2B Tools el compañero de viaje ideal hacia el futuro
K2B Tools el compañero de viaje ideal hacia el futuroK2B Tools el compañero de viaje ideal hacia el futuro
K2B Tools el compañero de viaje ideal hacia el futuro
 
Sd y Plataformas
Sd y PlataformasSd y Plataformas
Sd y Plataformas
 
PXTools: Nuevo generador y nuevos controles responsivos
PXTools: Nuevo generador y nuevos controles responsivosPXTools: Nuevo generador y nuevos controles responsivos
PXTools: Nuevo generador y nuevos controles responsivos
 
APPlícate: Aplicaciones móviles para el desarrollo de la industria
APPlícate: Aplicaciones móviles para el desarrollo de la industriaAPPlícate: Aplicaciones móviles para el desarrollo de la industria
APPlícate: Aplicaciones móviles para el desarrollo de la industria
 
GeneXus 4 Students
GeneXus 4 StudentsGeneXus 4 Students
GeneXus 4 Students
 
La importancia de ser responsive
La importancia de ser responsiveLa importancia de ser responsive
La importancia de ser responsive
 
K2B: El ERP nativo para el mundo GeneXus
K2B: El ERP nativo para el mundo GeneXusK2B: El ERP nativo para el mundo GeneXus
K2B: El ERP nativo para el mundo GeneXus
 
GeneXus 15 (Salto)
GeneXus 15 (Salto)GeneXus 15 (Salto)
GeneXus 15 (Salto)
 
GeneXus Cloud Deployment Services. El camino a la nube.
GeneXus Cloud Deployment Services. El camino a la nube.GeneXus Cloud Deployment Services. El camino a la nube.
GeneXus Cloud Deployment Services. El camino a la nube.
 
LigaMX con GeneXus: De 0 a 1.700.000 de usuarios
LigaMX con GeneXus: De 0 a 1.700.000 de usuariosLigaMX con GeneXus: De 0 a 1.700.000 de usuarios
LigaMX con GeneXus: De 0 a 1.700.000 de usuarios
 
Innovando con GeneXus y SAP
Innovando con GeneXus y SAPInnovando con GeneXus y SAP
Innovando con GeneXus y SAP
 
Going mobile
Going mobileGoing mobile
Going mobile
 
Audit+: La mejor forma de auditar KB’s GeneXus
Audit+: La mejor forma de auditar KB’s GeneXusAudit+: La mejor forma de auditar KB’s GeneXus
Audit+: La mejor forma de auditar KB’s GeneXus
 
WW+, SD+ y Audit+: Potencie GeneXus la Suite Plus
WW+, SD+ y Audit+: Potencie GeneXus la Suite PlusWW+, SD+ y Audit+: Potencie GeneXus la Suite Plus
WW+, SD+ y Audit+: Potencie GeneXus la Suite Plus
 
Aproveche las ventajas de la colaboración entre GeneXus y Cloud Shared Office...
Aproveche las ventajas de la colaboración entre GeneXus y Cloud Shared Office...Aproveche las ventajas de la colaboración entre GeneXus y Cloud Shared Office...
Aproveche las ventajas de la colaboración entre GeneXus y Cloud Shared Office...
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 

Laboratorio: Desarrollo para Smart Devices

  • 1. GeneXus Salto Lab “Developing Smart Devices applications”
  • 2. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 2 Copyright 1988 - 2015| Artech Consultores S. R. L. All rights reserved. This document may not be reproduced in any form without the express permission of Artech Consultores S.R.L. The information contained herein is only for personal use. Registered Trademarks Artech and GeneXus are registered trademarks of Artech Consultores S.R.L. All other trademarks mentioned in this document are property of their respective owners.
  • 3. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 3 Table of contents Aim ......................................................................................................................................................... 4 Preparation............................................................................................................................................. 4 Creating the Knowledge Base......................................................................................................... 4 Step 1 - Web Application and Initial Data Upload.................................................................................. 7 Step 2 – Applying Patterns and Creating Dashboard ........................................................................... 10 Application of the Work With Pattern for Smart Devices................................................................ 10 Creating the Dashboard ................................................................................................................... 11 Running the application on Android ................................................................................................ 13 Step 3 – Adding Design......................................................................................................................... 15 Annex 1 – Running on the Device (Android) (Optional)....................................................................... 19 Annex 2 – Multiple Layouts per Row (Optional) .................................................................................. 20 Annex 3 – SD Image Gallery (Optional)................................................................................................ 22 Thank you for participating!................................................................................................................. 25 Glossary................................................................................................................................................ 25
  • 4. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 4 Aim In this Lab, you will be provided with a step-by-step guide for the construction of a simple application for Smart Devices, using GeneXus Salto version. The aim of this laboratory, however, is not training but familiarization with the simplicity of the development of applications for smart devices with GeneXus. Preparation For this laboratory we will use GeneXus Salto version. You will find the icon to run it in the desktop with the name GeneXus Salto SD. We will also use SQL Server to handle the database of the application, and Android SDK, which has also been previously installed. We will also use Genymotion to emulate an Android device, which should already be running. Creating the Knowledge Base We will start creating the Knowledge Base with the following configuration:  Name = “LabSD<UserNumber>” UserNumber is written on the computer.  Directory = C:Models  Prototyping Environment = C# Environment  Under Advanced, set Server = “Lab<UserNumber>”, then check “Use Windows NT integrated Security”
  • 5. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 5 We will now import objects from the web application which we will use as basis for our Smart Devices application. Now open Knowledge Manager>Import, click on the Navigation button […] and select GX25LabSD.xpz (Located under LabSD folder on the Desktop). We then click on Import>>. You will see an exemplary KB, reduced for the specific purposes of this laboratory. This KB will contain a Web application, which we will take as a starting point to create our Smart Devices version of it.
  • 6. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 6
  • 7. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 7 Step 1 - Web Application and Initial Data Upload This will be the home page we will find when opening the KB named "GeneXusMeetingLabSD"+ User Number in GeneXus. Let's go over its different parts before going any further. 1. Toolbar: It provides access to all the GeneXus Knowledge Base options. 2. Knowledge Base Navigator: It is a set of contextual menus to browse on objects, whether in its view by folders (Folder View), categories (Category View), or also to view the list of latest changes (Latest Changes View) and Model Properties (Preferences). 3. Main: This is where the Start Page and one tab for each of the Objects opened unfold. 4. Properties and toolbox: for controls, objects and selected variables. 5. Output: for different operations (specification, generation, compiling, etc.). As we can see on the Folder View of the Knowledge Base Navigator, we have a pre-loaded application which, as we have already mentioned, is only implemented as a Web application, and our job will be to create its version for Smart Devices. Now we will execute the Web version to see what it is all about.
  • 8. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 8 In this lab, we will run our application on the cloud. In order to do so, we will set the following .Net Generator Properties in Preferences (in the Knowledge Base Navigator):  Deploy to cloud = Yes  Deploy Virtual Directory = LABSD<GXtechnicalUser>  Deploy Server URL = http://apps5.genexus.com Also, set the Data Store properties:  Database name = LABSD<GXtechnicalUser>  Server Name = apps5.genexus.com After doing this, we select Run (Build > Run Developer Menu) for the application.
  • 9. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 9 A home page like the one below will be displayed in the browser: We click on the Home link, which will take us to the home page for Web: We will then create a simple Smart Devices version of this Web model. Feel free to take a look at the Web application for a moment, if you wish to do so.
  • 10. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 10 Step 2 – Applying Patterns and Creating Dashboard We have 3 Transactions: Country, Speaker, and Session, which currently have the Work With Web pattern applied to them. Application of the Work With Pattern for Smart Devices We proceed to apply the pattern for Smart Devices. We double click on the Country transaction (within the Root Module > Transactions folder). A tab will open to work with that transaction. On the lower part of the screen we will see the following task bar: We then select the Patterns option. The following will then be displayed: First, we will select the tab that corresponds to the Work With for Smart Devices pattern, and then we will click on the option Apply this pattern on save. Finally, we will save our changes with the Save button and repeat the process for the other two transactions. Note that in the Folder View under the node of each Transaction the objects created by the pattern that corresponds to each of them will appear.
  • 11. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 11 Creating the Dashboard We will now create a Dashboard object, which will be the starting point for our Smart Devices application. To do so, we will select (on the ToolBar) File > New > Object (or using the shortcut Ctrl + N). We will select the Dashboard object from the object list and we will name it. For this example, we will use GeneXusMeeting. We will then press the Create button. We already have the starting point for our application, now we only need to add the corresponding entries to the Dashboard in order to execute the WorkWithSmartDevices we have previously created on our transactions. To do so, we right click on the Items node in the Dashboard we have created and add a new Action (Add>Action), as shown in the following image:
  • 12. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 12 An object selection dialogue will appear, in which we will need to look for the WorkWithDevices for the three transactions we have created, and add them one by one. Then we save the changes with the Save button. After adding the three WorkWithDevices, our Dashboard should look like this:
  • 13. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 13 We are now ready to run our application on Android. For this, we only need to specify Dashboard GeneXusMeeting will be the starting point of the application. This can be done through the Startup Object property in the .Net Environment. Running the application on Android Having done this, we can run our application by clicking Run (F5). An instance of the application will run on the Android Emulator. Loading of the emulator may take a few minutes, it is recommended not to close it during the laboratory.
  • 14. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 14 In the emulator, we load the Startup Object we had configured previously: the GeneXusMeeting Dashboard. We will then see the three input options for our application (Country, Speaker and Session) which are the ones we added as Actions on the Dashboard.
  • 15. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 15 Get to know the Emulator: - See the list of Speakers and tap on any given person. - You will see his or her information (for example, name, photo, ID, etc.). - Select the "back" button to go back to the home page. Tip: Do not close the Emulator. This way you’ll avoid the emulator reopening every time you execute the application Step 3 – Adding Design We will now add some design, so that our application looks better. In order to do this, we will go back to the Dashboard and select the action corresponding to Country and, on its properties, we will change the way in which it shows its description and image, as follows: We do the same for the other two Actions in the Dashboard: Session and Speaker. Keep in mind that for the property Image we will use images that have been pre-loaded to the KB, named: CountriesSD, SpeakersSD and SessionsSD, and we add them as follows:
  • 16. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 16 Now let’s open WorkWithDevicesSpeakers object. We will now change the information shown on the List for WorkWithDevicesSpeakers. We replace SpeakerName for SpeakerFullName and we add CountryName right under the previous to show the Speaker’s country. When adding an attribute the Label is added displaying the name of the attribute. To remove them we will set Label Position property to None. To improve the looks will make the Speaker’s photo to fill both rows. We Access the Image properties and set Row Span to 2. Now, to further improve the looks of our application, we will insert a Launch Image to be shown when the application starts. We will also add a new icon and title. In order to change the title, we will click on the Dashboard node, and on the Title property we will modify and set Lab SD as shown in the image:
  • 17. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 17 Then, to add a new icon and launch image, we will click on the Dashboard object in the Folder View and we will modify the properties: Android Application Icon and Android Portrait Launch Image, as shown on the following image:
  • 18. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 18 Finally, we select Rebuild All and run the application to see the changes we have generated: (F5).
  • 19. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 19 Annex 1 – Running on the Device (Android) (Optional) If you have an Android device, you can also install the application on it. The steps to follow are these: Go back to the IDE on GeneXus, and go to the ToolBar: View > Show QR Codes. This will display the browser with the following content: All we have to do now is simply read the QR code that has been generated for Android with our device and the .apk file generated by GeneXus will automatically start downloading in order to install the application. Note: You must allow the installation of applications from unknown sources. This can be usually enabled on the security section of the Settings menu.
  • 20. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 20 Annex 2 – Multiple Layouts per Row (Optional) The aim is that when a user taps on a Speaker on the List, instead of directly showing the detailed information of the Speaker, this particular line expands, showing the CV there. Solution: We access List section for WorkWithDevicesSpeaker. Click on the upper right corner of the Grid and select Add New Item Layout which we will define with the name "Select". On this new layout, insert the SpeakerCVMini attribute right under SpeakerImage, and set Label Position = None and Col Span = 3 so it will fill 3 columns. For the Grid we will also modify properties Default Selected Item Layout as Select and Default Action = <none>. Now for the table located inside de Grid set Columns Style = 64dip; 85%; 15% To view more details, the user must tap on the image of an arrow pointing to the right (arrow_right). What do we have to do to achieve this behavior? Solution: Step 1 We open the Select layout and drag an Image control to the right of SpeakerFullName. Search and select arrow_right image. On the Image properties set Row Span = 2.
  • 21. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 21 Step 2 Right click on the SpeakerImage attribute and select Go to Event > Tap, on the associated event, to insert the following code line (this will take us to the Speaker details): WorkWithDevicesSpeaker.Speaker.Detail(SpeakerId) To finalize, we execute the application to see the changes added: (F5).
  • 22. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 22 Annex 3 – SD Image Gallery (Optional) We will create a new Panel for Smart Devices type object. We will then go to: File > New > Object and create that object with the name: ImageGalleryCountry. Once created, on the ToolBox toolbar we will create a Grid in the layout. To do so, Drag & Drop the Grid option on our panel layout, and a dialogue will appear to specify which attribute/variable we will insert in the Grid. Select CountryFlag and then press the OK button. We will then see the Grid we created, with the attribute inside of it. We can now indicate that we want to show that grid as an image gallery. In order to do this, click on the Grid and go to its properties. We will change the properties:  Control Type = SD Image Gallery  Data Attribute = CountryFlag  Grid Behavior = Show Full Image  Enable Share Action = True
  • 23. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 23 Step 1 We will associate this event within the WorkWithDevicesCountry so that we can invoke it. To do so, we will open the List and drag from the Toolbox a Button and drop it into the Application Bar. We will name it “CountryFlags”.
  • 24. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 24 Step 2 Double click on the button, or right click> Go To Event, it will send us to the event that is associated to that button. Here we will call the panel we have just created with the following code: Event 'CountryFlags' ImageGalleryCountry.Call() Endevent Finally, we run a Rebuild All and then execute the application to see the added changes: (F5). In order to visualize the panel we have previously created, click on the menu button of the emulator, which will show the button that will invoke that panel.
  • 25. Laboratorio GeneXus Salto Beta. “Aplicaciones Smart Device” | 25 Thank you for participating! Glossary My First Android Application http://wiki.genexus.com/commwiki/servlet/hwikibypageid?14555 Applying Work With Pattern for Smart Devices http://wiki.genexus.com/commwiki/servlet/hwikibypageid?15975 Multiple Layouts per Row http://wiki.genexus.com/commwiki/servlet/hwikibypageid?22545 Using SD Image Gallery Control http://wiki.genexus.com/commwiki/servlet/hwikibypageid?15308