097 smart devices-con_las_aplicaciones_de_gestión

Post on 14-Jan-2015

953 Views

Category:

Business

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

Smart Devices con las aplicaciones de gestiónAlfonso FernándezJosé Bordón

Agenda

Smart Devices y la actualidad1

Presentación de GXEv2 a los clientes2

Integración de GXEv2 con las aplicaciones3

Beneficios4

SD vs Pc

Ventas en el T4 2010 (millones)86

88

90

92

94

96

98

100

102

SmartPhonesPCs

Fuente: Consultora IDC

Wordwide smartphone sales to end users by operating system (Marquet share in %)

Android IOS Symbian Research in Motion

Bada Microsoft0

5

10

15

20

25

30

35

40

45

50

Cantidad vendida: 107,8 mill

2Q112Q10

Fuente: Gartner (August 2011)

Smart devices

Cloud

DEMOAPPs

SD/Apps de gestión

DBRET

Transaction

mobile

web

servidores

SD/Apps de gestión

Geolocationpublic static Location getLastKnownLocation(){LocationManager aLocationManager = (LocationManager)

MyApplication.getInstance().getSystemService(Context.LOCATION_SERVICE);if (aLocationManager != null) {// Should get the last in time location, comparing location.getTime() ?Location gpsLocation = aLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);Location networkLocation =

aLocationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);Location location = getLastLocation(gpsLocation, networkLocation);if (location != null)return location;else {Criteria crit = new Criteria();crit.setAccuracy(Criteria.ACCURACY_FINE);String provider = aLocationManager.getBestProvider(crit, true);location = aLocationManager.getLastKnownLocation(provider);if (location != null)return location;}}

return null;}private static Location getLastLocation(Location gpsLocation,Location networkLocation) {if (gpsLocation!=null)return gpsLocation;return networkLocation;}

public static JSONObject getLastKnownLocationJsonGeoLocationInfo(){Location location = getLastKnownLocation();JSONObject result = new JSONObject();if (location!=null)result = locationToJson(location);return result;}public static void requestLocationUpdates(Integer minAccuracy, Integer timeout, boolean

includeHeadingAndSpeed){

LocationManager locationManager = (LocationManager) MyApplication.getInstance().getSystemService(Context.LOCATION_SERVICE);

String provider = getBestProviderFromCriteria(includeHeadingAndSpeed,locationManager);locationManager.requestLocationUpdates(provider, 0, 0, locationListener);}public static Location getLocationGeoLocationInfo(Integer minAccuracy, Integer timeout, boolean

includeHeadingAndSpeed){//Date startTime = new Date();//default to returnLocation location = null;LocationManager locationManager = (LocationManager)

MyApplication.getInstance().getSystemService(Context.LOCATION_SERVICE);String provider = getBestProviderFromCriteria(includeHeadingAndSpeed,locationManager);location = locationManager.getLastKnownLocation(provider);long difLocInSeconds = 0;if (location!=null){

difLocInSeconds = getDifInSeconds(location.getTime(), startTime.getTime());}while(location==null //has no location || (minAccuracy!=0 && (!location.hasAccuracy() || location.getAccuracy()> minAccuracy)) //has not accuracy || difLocInSeconds>tenMinutes ) //is old location{//wait one sec to new location to arrivetry {Thread.sleep(1000);} catch (InterruptedException e) {// TODO Auto-generated catch blocke.printStackTrace();}if (newCurrentLocation!=null){location = newCurrentLocation;difLocInSeconds = 0;}Date endTime = new Date();long difInSeconds = getDifInSeconds(startTime.getTime(), endTime.getTime());

if (difInSeconds>timeout){break;}}//default to returnif(location==null)location = getLastKnownLocation();return location;}

public static JSONObject getLocationJsonGeoLocationInfo(Integer minAccuracy, Integer timeout, boolean includeHeadingAndSpeed)

{Location location = getLocationGeoLocationInfo(minAccuracy, timeout, includeHeadingAndSpeed);//return resultJSONObject result = new JSONObject();if (location!=null){result = locationToJson(location);

Services.Log.info("getLocationInfo", "Location: " + location.toString());}return result;}

private static long getDifInSeconds(long startTime, long endTime) {long dif = endTime - startTime;long difInSeconds = dif / 1000;return difInSeconds;}public static void removeLocationUpdates(Integer minAccuracy, Integer timeout, boolean

includeHeadingAndSpeed){LocationManager locationManager = (LocationManager)

MyApplication.getInstance().getSystemService(Context.LOCATION_SERVICE);locationManager.removeUpdates( locationListener);}private static String getBestProviderFromCriteria(boolean includeHeadingAndSpeed, LocationManager locationManager) {//Calculate new location with the criteria.

Criteria crit = new Criteria();crit.setAccuracy(Criteria.ACCURACY_FINE);crit.setAltitudeRequired(false);crit.setBearingRequired(includeHeadingAndSpeed);crit.setCostAllowed(true);String provider = locationManager.getBestProvider(crit, true);return provider;}private static JSONObject locationToJson(Location location) {JSONObject jsonProperty = new JSONObject();try {jsonProperty.put("Location", String.valueOf(location.getLatitude()) + "," +

String.valueOf(location.getLongitude()) );jsonProperty.put("Description", "LocationInfo (" + location.getProvider() + ")");Date date = new Date();date.setTime(location.getTime());jsonProperty.put("Time", Services.Strings.getDateTimeStringForServer(date) );jsonProperty.put("Precision", String.valueOf(location.getAccuracy()) );if (location.hasBearing())jsonProperty.put("Heading", String.valueOf(location.getBearing()));

elsejsonProperty.put("Heading", String.valueOf(-1));if (location.hasSpeed())jsonProperty.put("Speed", String.valueOf(location.getSpeed()));elsejsonProperty.put("Speed", String.valueOf(-1));} catch (JSONException e) {e.printStackTrace();Services.Log.Error("locationToJson", "Exception in JSONObject.put()", e); }return jsonProperty;}public static String getLocationString(Location myLocation){if (myLocation!=null)return String.valueOf(myLocation.getLatitude()) + "," + String.valueOf(myLocation.getLongitude() );return "";}private static final LocationListener locationListener = new LocationListener() {@Overridepublic void onStatusChanged(String provider, int status, Bundle extras) {

}@Overridepublic void onProviderEnabled(String provider) {}@Overridepublic void onProviderDisabled(String provider) {}@Overridepublic void onLocationChanged(Location location) {//update my locationServices.Log.info("onLocationChanged", "Location: " + location.toString());newCurrentLocation = location;}};

Beneficios• Integración con aplicaciones desarrolladas con

Genexus.• Integración con sistemas no Genexus.• Reutilización de los objetos Genexus.• No requiere inversión en capacitación.• Fácil mantenimiento para los clientes.• Deploy en varios OS. • Seguridad Integrada.

La evolución continua

Line of business applications

Consumerapplications

La evolución continua

Line of business applications Display applications

Transaction applications

Resumen

Smart Devices en la actualidad1

LBA vs CA2Necesidades del

mercado corporativo3Beneficios GxEv24

Asesor del pentágonoCoronel Jhon Boyd

“Aquel que gana la batalla no es el más fuerte , ni siquiera el más valiente, es aquel que tiene la mayor capacidad de adaptarse a los cambios”

Alfonso Fernándezfernandez.laconich@gmail.comJosé Bordónjbordon@sisa.com.py

top related