title: Using Fused Location provider for android in a non activity java class and get longitude and latitude in main Activity class
body: <p>I want to use fused location provider in my android application and get the current users location longitude and latitude and pass it as a map link in text message.<br/><br/>
  I used this example <a href="http://www.androidwarriors.com/2015/10/fused-location-provider-in-android.html" rel="nofollow">FusedLocation Example</a> to get <strong>long</strong> and <strong>lat</strong> coordinates of location but in my case i want to put all fusedLocation functions in a java class which is a non activity class and call it from main activity class to get <strong>long</strong> and <strong>lat</strong> ,</p>
  
  <p>since i m a beginner in android and i searched alot to find something like this but couldn't get a example or tutorial.
  <br/><br/>
  can anybody help me in this or advice me if its the better solution to retrieve location coordinates and address from any provider working in any situations?<br/>
  thanks in advance</p>