• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
097 smart devices-con_las_aplicaciones_de_gestión
 

097 smart devices-con_las_aplicaciones_de_gestión

on

  • 1,051 views

 

Statistics

Views

Total Views
1,051
Views on SlideShare
948
Embed Views
103

Actions

Likes
0
Downloads
8
Comments
0

2 Embeds 103

http://www3.gxtechnical.com 87
http://www2.gxtechnical.com 16

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    097 smart devices-con_las_aplicaciones_de_gestión 097 smart devices-con_las_aplicaciones_de_gestión Presentation Transcript

    • SmartDevices con las aplicaciones de gestión
      Alfonso Fernández
      José Bordón
    • Agenda
      1
      SmartDevices y la actualidad
      2
      Presentación de GXEv2 a los clientes
      3
      Integración de GXEv2 con las aplicaciones
      4
      Beneficios
    • SD vs Pc
    • Wordwidesmartphone sales toendusersbyoperatingsystem (Marquet share in %)
      Fuente: Gartner (August 2011)
    • Smartdevices
      Cloud
    • Demo
      APPs
    • SD/Apps de gestión
      DBRET
      Transaction
    • servidores
      mobile
      web
    • SD/Apps de gestión
    • Geolocation
      public static Location getLastKnownLocation()
      {
      LocationManageraLocationManager = (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 JSONObjectgetLastKnownLocationJsonGeoLocationInfo()
      {
      Location location = getLastKnownLocation();
      JSONObject result = new JSONObject();
      if (location!=null)
      result = locationToJson(location);
      return result;
      }
      public static void requestLocationUpdates(Integer minAccuracy, Integer timeout, booleanincludeHeadingAndSpeed)
      {
    • LocationManagerlocationManager = (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, booleanincludeHeadingAndSpeed)
      {
      //
      Date startTime = new Date();
      //default to return
      Location location = null;
      LocationManagerlocationManager = (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 arrive
      try {
      Thread.sleep(1000);
      } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.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 return
      if(location==null)
      location = getLastKnownLocation();
      return location;
      }
      public static JSONObjectgetLocationJsonGeoLocationInfo(Integer minAccuracy, Integer timeout, booleanincludeHeadingAndSpeed)
      {
      Location location = getLocationGeoLocationInfo(minAccuracy, timeout, includeHeadingAndSpeed);
      //return result
      JSONObject 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, booleanincludeHeadingAndSpeed)
      {
      LocationManagerlocationManager = (LocationManager) MyApplication.getInstance().getSystemService(Context.LOCATION_SERVICE);
      locationManager.removeUpdates( locationListener);
      }
      private static String getBestProviderFromCriteria(
      booleanincludeHeadingAndSpeed, LocationManagerlocationManager) {
      //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 JSONObjectlocationToJson(Location location) {
      JSONObjectjsonProperty = 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()));
    • else
      jsonProperty.put("Heading", String.valueOf(-1));
      if (location.hasSpeed())
      jsonProperty.put("Speed", String.valueOf(location.getSpeed()));
      else
      jsonProperty.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 LocationListenerlocationListener = new LocationListener() {
      @Override
      public void onStatusChanged(String provider, int status, Bundle extras) {
    • }
      @Override
      public void onProviderEnabled(String provider) {
      }
      @Override
      public void onProviderDisabled(String provider) {
      }
      @Override
      public void onLocationChanged(Location location) {
      //update my location
      Services.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
      Consumerapplications
      Line of businessapplications
    • La evolución continua
      Line of businessapplications
      Displayapplications
      Transactionapplications
    • Resumen
      1
      SmartDevices en la actualidad
      2
      LBA vs CA
      3
      Necesidades del mercado corporativo
      4
      Beneficios GxEv2
    • Asesor del pentágono
      Coronel JhonBoyd
      “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