1. Home
  2. Integrations
  3. Android Native Events Setup Guide
  4. Healthcare Applications – Android

Healthcare Applications – Android

We have provided an Event with example that can be integrated for Applications that belong to the Healthcare Vertical. Please find them below:

1.Purchase Service Event

This is used to track the services purchased by the user which are offered in the application.(After User Successfully completed payment of the service offered.)

You will need to call the below method of MTractionEventTracker Class to track the Purchase Service event in your Application. 

public static void trackPurchaseService(Context context, Reservation reservation);
PurchaseService purchaseService = new PurchaseService
(userId, serviceType, revenue, transactionId, PurchaseService.PaymentMode.XXX,  locale);

  • Mandatory parameters (Rate):                                          
    • User Id – Unique User Identifier
    • Purchase Method– PurchaseService.PaymentMode.XXX – XXX can take any of the predefined values for payment methods, [CREDIT_CARD or DEBIT_CARD or NET_BANKING or GIFT_CARD or PAYMENT_WALLET]
    • Revenue– Total Revenue generated from this Purchase Service event
    • Transaction
      Id  – Unique Purchase Service Transaction Identifier
    • Locale – Currency code used for this event. We can get currency code information precisely in either of the following ways:          
      1. Default from device configuration:              
        Locale locale = Locale.getDefault();

        Note: Recommended for more accuracy.

      2. Custom setting:                
        Locale locale = new Locale("JA"/*Language Code*/, "JP" /*Country Code*/);

        Note: Click here to view the list of Country codes (ISO-3166) & Language codes (ISO-639).

    • Service Type-Service Type applied for the Purchase Service
  • Optional parameters (Purchase Service):                                         
    • Provider Id – Unique Provider Identifier
    • Provider Name -Name of the Provider
    • Page Name – Page that triggered the Event
    • Location – Geolocation of the Event
    • Date – Purchase Booking date

Sample Code

// Example Longitude & Latitude code (Long / Lat is optional)

LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); 
Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);

// Example Purchase Service Constructor Call with the mandatory parameters

PurchaseService purchaseService=new PurchaseService("101","RoutineCheckup",2.9f,"21",PurchaseService.PaymentMode.DEBIT_CARD,Locale.getDefault());
purchaseService.setPageName("Purchase Service");
purchaseService.setLocation(13.0380483, 80.1908878);
purchaseService.setBookDate(Date bookDate);

// Examples for other parameters passed for the Purchase Service Class (These are optional)

purchaseService.setPageName("Purchase Service")
               .setLocation(location.getLatitude(), location.getLongitude());
               .setBookDate(Date bookDate);

// trackPurchaseService method call



Was this article helpful to you? Yes No

How can we help?