title: IBM MobileFirst 7.0 - Http Adapter Invocation using trigger concept
body: <p>Can we call Http Adapters using triggers in IBM Mobilefirst.</p>
  
  <p>I'm working on Location based Services and Push notification Integration part like when use enters into the Geofench area we need to call push adapter to send notification to mobile device.</p>
  
  <p>Geofenche Code:</p>
  
  <pre><code>dwellArea: { // alert when we have stayed in the vicinity for 3 seconds
                          type: "DwellInside",
                          circle: {
                              longitude: pos.coords.longitude,
                              latitude: pos.coords.latitude,
                              radius: 50
                          },
                          dwellingTime: 3000,
                          callback: function() {
                              alert('Still in the vicinity');
  </code></pre>
  
  <p>Here Can we call Http Adapter invocation i.e push Adapter See Below:</p>
  
  <pre><code>                            WL.Client.transmitEvent({ event: 'dwell inside area'}, true);
                          }
                      }
  </code></pre>
  
  <p>Push Notification Code:</p>
  
  <pre><code>var invocationData = {adapter : "PushAdapter",
                                         procedure : "submitNotification",
                                         parameters : [ "Vinod", "Hello This is Push notification" ]
                                       };
                              var options = {
                                      onSuccess : onGetAccountsSuccess,
                                      onFailure : onGetAccountsFailed,
                                      timeout : 30000
                                  };
                              WL.Client.invokeProcedure(invocationData, options);
  </code></pre>
  
  <p>can we directly call this push notification code directly in this call back in Geofench coding or is there any alternative solution for this.</p>
  
  <p>Reference links:</p>
  
  <p>Geo-fench:
  <a href="https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/advanced-topics/location-services-hybrid-applications/" rel="nofollow">https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/advanced-topics/location-services-hybrid-applications/</a></p>
  
  <p>Pushnotification:
  <a href="https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/notifications/push-notifications-hybrid-applications/#whatIsPushNotifications" rel="nofollow">https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/notifications/push-notifications-hybrid-applications/#whatIsPushNotifications</a></p>