Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

I have two buttons in my app one for open gmail and other one for open map with latitude and longitude but both methods are not working in mu ionic app

$
0
0

@scientificwebs wrote:

this is the method for open gmail

mailto()
{
this.platform.ready().then(() =>
{

	  if (this.platform.is('ios')) 
	{
			window.open('googlegmail:///co?to='+this.email+'&subject='+'subject'+'&body=','_system');
			
	};
	  if (this.platform.is('android'))
	{
	      window.open('mailto:'+this.email);

	};

});
}

//and this is for opem map in ionic

locationOpen()
{

this.platform.ready().then(() => {
   this.geolocation.getCurrentPosition().then((position) => 
   {
    // ios
    if (this.platform.is('ios')) 
	{
      window.open('maps://?q=' + this.address + '&saddr=' + position.coords.latitude + ',' + position.coords.longitude + '&daddr=' + this.lat + ',' + this.longe, '_system','location=yes');
    };
    // android
    if (this.platform.is('android'))
	{
      window.open('geo://' + position.coords.latitude + ',' + position.coords.longitude + '?q=' + this.lat+ ',' + this.longe + '(' + this.address+ ')', '_system');
    };
  });
});

}

please any one can help me i tried all logic from google.

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>