Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
pavabe  
#1 Posted : Sunday, December 18, 2011 2:22:06 AM(UTC)
pavabe

Rank: Newbie

Groups: Member
Joined: 12/17/2011(UTC)
Posts: 5

Was thanked: 3 time(s) in 3 post(s)
If a user don't have installed the Aurigma app on his/her iPhone/iPod/iPad and she/he press on the Upload Images link it goes directly to the app store for downloading the app.

Code:
<script type="text/javascript">
 window.launchAurigma = function() {
   var start = new Date();
   setTimeout(function() {
     if (new Date() - start > 2000) {
       return;
     }
     window.location = 'http://itunes.apple.com/ru/app/aurigma-up/id432611633?mt=8';
   }, 1000);

<!-- Use this one with the API / Code Designer //-->
   window.location = 'aurup:?uploadUrl=http://yourdomain.com/upload&redirectUrl=http://yourdomain.com/gallery';

<!-- Use this one with the sample files //-->
   window.location = '<?php echo build_url('upload.php', 'gallery.php', 'index.php', TRUE); ?>';
 };
</script>

<a href="javascript:launchAurigma();">Upload Images</a>

Edited by moderator Sunday, January 22, 2012 8:19:43 PM(UTC)  | Reason: Not specified

thanks 1 user thanked pavabe for this useful post.
p.shirykalova on 12/18/2011(UTC)
pcoraccio  
#2 Posted : Thursday, January 19, 2012 8:38:51 AM(UTC)
pcoraccio

Rank: Newbie

Groups: Member
Joined: 1/10/2012(UTC)
Posts: 7

Thanks: 1 times
Thanks for the post pavabe. When implementing this, I still get the general Safari browser error before it gets redirected. Does the same occur for you?

Thanks,

- Pat

p.shirykalova  
#3 Posted : Thursday, January 19, 2012 9:30:13 PM(UTC)
p.shirykalova

Rank: Advanced Member

Groups:
Joined: 7/13/2011(UTC)
Posts: 286

Thanks: 6 times
Was thanked: 31 time(s) in 31 post(s)
Hi Pat,

Could you please confirm that the error message you see is "Cannot open page"?

If so, this is an expected behavior.

The function provided by Patrick works in the following way:

  1. Safari tries to open 'aurup:?uploadUrl=http://yourdomain.com/upload&redirectUrl=http://yourdomain.com/gallery' URL.

  2. if there is no Aurigma Up installed on the device, the attempt fails and you get "Cannot open page" error.

  3. After that Safari opens iTunes page with the app.

If you see different error message please provide me with a screenshot or error message text, also please share the link to your page and the code.

Thanks.

Edited by user Thursday, January 19, 2012 9:31:56 PM(UTC)  | Reason: Not specified

Best regards,

Pauline Shirykalova

Aurigma Technical Support

pasher  
#4 Posted : Monday, January 23, 2012 4:12:06 AM(UTC)
pasher

Rank: Newbie

Groups: Member
Joined: 1/19/2012(UTC)
Posts: 4

Tried using the above code and the upload link just didn't respond with anything.

Ideally, I just want to test if the Aurigma Up app is installed, and if so, skip the 'Get Aurigma Up' button.

Here's my code with 'conditional' statements commented -

{***** IF Aurigma Up not installed *****}

In order to upload gig photos from your iPhone or iPad, you need the following <b>free</b> app installed

<br><br>

<form method="post" action="http://itunes.apple.com/ru/app/aurigma-up/id432611633?mt=8">

<input type="submit" value="Aurigma Up" class="jform button">

</form>

<br>

Click on the above button to install this app

<br><br>

{***** ELSE *****}

<a href="aurup:?uploadUrl={$JAMROOM_URL|jr_urlencode}%2FGigLodge_upload.php&redirectUrl=http%3A%2F%2Fgiglodge.com%2F%3Fgmode%3Dgig%26from_upload%3D1&redirectDelay=0&returnUrl=http%3A%2F%2Fgiglodge.com%2F&uploadTimeOut=30&licenseKey={$GigLodge_aurigma_api_key}&fields=gig_id%3D{$gig_id}%3Bvlatitude%3D{$vlatitude}%3Bvlongitude%3D{$vlongitude}%3Bmode%3DiPhone%3Bdonar_id%3D{$_USER.band_id}"><b>Upload gig images</b></a>

<br><br>

{***** /IF *****}

So, how to test if app is installed?

Thanks

Pa

p.shirykalova  
#5 Posted : Tuesday, January 24, 2012 12:02:10 AM(UTC)
p.shirykalova

Rank: Advanced Member

Groups:
Joined: 7/13/2011(UTC)
Posts: 286

Thanks: 6 times
Was thanked: 31 time(s) in 31 post(s)
Hi,

I tried to google a solution for you.

It seems that it is impossible to detect if the app is installed, unless it uses custom URL scheme.

Unfortunately Aurigma Up doesn't use any, so there is no way you can test if the app is installed.

Please see my search results for more details.

Best regards,

Pauline Shirykalova

Aurigma Technical Support

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.