Archive | February, 2012

DEMO Asia 2012

February 29, 2012

DEMO Asia is the inaugural launchpad for emerging technologies from Asia. This year, it is held in Singapore for over 2 days, with over 70 companies participating.

Hoiio API is also participating! We will be presenting on stage with our awesome APIs, under the category of Cloud technologies.

If you are attending DEMO Asia, do hear us on stage at 10.30am, 1 March 2012. And drop by our booth at L2-0002.

Photo from sgentrepreneur.com

Tags: ,
Posted by:

Hoiio supports Hack & Roll 2012

February 27, 2012


NUS Hackers organized Hack & Roll 2012 (a 24 hour hackthon from 19th Feb 1pm to 20th Feb 1pm) to encourage students to build apps that would benefit the NUS community. The Hoiio API team supported the event by offering a special signup for the participants so that they can use their free $10SGD credits without trial restrictions, i.e. they can use their credits to sms/call any number.

The following apps built during the hackathon made use of Hoiio API:

  • Geek Rave by team N-Team is a web app that allows students to show off their projects and have other students “rave” about it. When someone raves about your project, you’ll get an SMS notification.
  • Vigilance by Semantics3 is a mobile Android app that sends SMS alerts to parents when their child/ward is in a dangerous area.
  • Cab 2gether by team GiveUsPlaybooks! is application for people who want to share cabs.

Additional coverage and results of the event can be found at e27.

Edit: added links to blog post by Semantics3

Tags: ,
Posted by:

Hoiio API Showcase: Drive.SG

February 24, 2012

Hey all drivers.

Will like to introduce you all to a new online service for Car Rental. We all know Car Rental, they operates in hard to reach places and sometime you travel all the way to rent a car and then find out that they are all rented out. And there is simply no easy way to compare and get the best deal. Cheers, we have now found the solution in Drive.SG, the friendly portal to find the best car rental deal for that special occasion.

https://www.drive.sg/

I am also glad that they are using the Hoiio API to empower their products. To help enhance communication between drivers and car rental companies, DriveSG has integrated a series of automated SMS and Voice communication tools.

Hence, when you register for DriveSG, please ensure that your phone number is valid. With this phone number, DriveSG will be able to provide timely information on your car rental for you via SMS and phone calls. Cheers.

Tags:
Posted by:

Hoiio API Example: WeatherByPhone

February 17, 2012

Another simple yet interesting example was developed using Hoiio API.

This example let you check the weather of your location by using your mobile phone. It makes use of Yahoo weather API.

Application flow:

The app requires the WOEID code which is introduced by Yahoo to uniquely identify any location on Earth. To find the WOEID of your location, you can find by browser/search from the Yahoo weather homepage. The WOEID is in the URL for the forecast page for that city. For example, if you search for Singapore on the Weather home page, the forecast page for that city is http://weather.yahoo.com/singapore/central-singapore/singapore-1062617/. The WOEID is 1062617.

The response user will hear is “It is currently 28 degrees celsius and partly cloudy in Singapore“. The application will keep asking the user until he/she hangs up the phone.

Let’s look closer into the code:

  1. Global variables: we define all global variables like appId, accessToken,…
    $appId       = "[Your appId]";
    $accessToken = "[Your accessToken]";
    $server      = "https://secure.hoiio.com/open";
    $myUrl       = "[Your notify URL address]";
    
    1. The appId and accessToken are generated for you when you create an application in the developer portal
    2. The notify URL is the address that Hoiio will notify developer after each step to ask for the next step (or next building block)
  2. The controller: maintain the state of the call to do correct actions
    if ($_POST['call_state'] == "ringing") {
    	askZip();
    	return;
    }
    else if ($_POST['call_state'] == "ongoing") {
    	switch ($_POST['tag']) {
    		case "askZip":
    			checkDigitPressed();
    			break;
    		case "playMessage":
    			askZip();
    			break;
    	}
    }
    else if ($_POST['call_state'] == "ended") {
    	// Call has ended, can do anything here
    }
  3. The askZip() function: send a Gather API to ask for the WOEID codes
    $data = http_build_query(
    	 array(	"app_id" 		=> $GLOBALS['appId'],
    			"access_token" 	=> $GLOBALS['accessToken'],
    			"tag"		=> "askZip",
    			"session"	=> $_POST['session'],
    			"msg"		=> "Please enter your W-O-E-I-D code.",
    			"max_digits"	=> "9",
    			"notify_url" 	=> $GLOBALS['myUrl']));
    
    do_post_request($GLOBALS['server']."/ivr/middle/gather", $data);
    
  4. The checkDigitPressed() function:
    $zip = $_POST['digits'];
    // Checks the zip code
    if (strpos($zip, '*') !== false) {
    	playMessage("You have entered an invalid W-O-E-I-D code");
    }
    else {
    	// Get the forecast
    	$forecastStr = do_get_request("http://weather.yahooapis.com/forecastrss?w=" . $zip . "&u=c");
    
    	if (strpos($forecastStr, "City not found")) {
    		playMessage("You have entered an invalid W-O-E-I-D code");
    	} else {
    		// Extract the temperature info
    		$rss = new SimpleXMLElement($forecastStr);
    		$temp = $rss->channel->item->children('yweather', true)->condition->attributes()->temp;
    		$condition = $rss->channel->item->children('yweather', true)->condition->attributes()->text;
    		$location = $rss->channel->children('yweather', true)->location->attributes()->city;
    
    		playMessage("It is currently ". $temp ." degrees celsius and ". $condition ." in ". $location .".");
    	}
    }
    

    This function verifies the code then send the http request to Yahoo to get the weather information of that location. If the response is “City not found”, it asks again for the WOEID code.

  5. The playMessage() function: play the result to the user
    $data = http_build_query(
    	array(	"app_id" 		=> $GLOBALS['appId'],
    			"access_token" 	=> $GLOBALS['accessToken'],
    			"tag"			=> "playMessage",
    			"session"		=> $_POST['session'],
    			"msg"			=> $msg,
    			"notify_url" 	=> $GLOBALS['myUrl']));
    
    do_post_request($GLOBALS['server']."/ivr/middle/play", $data);
    

That’s it! It’s simple and straight forward and you can do it in less than 30 minutes.

Download

The source code you can download here.

Tags: , ,
Posted by:

Subscribe to Numbers via New APIs

February 13, 2012

Subscribe to Hoiio Numbers so that users can call-in to your application.

For users to call your application, you will need to provide them a Hoiio Number. Previously subscribing to a Hoiio Number has to be done manually via the Developer Portal, now we have added APIs that let your application subscribe Hoiio Numbers automatically. This means you can now subscribe to Hoiio Numbers on the fly and create applications where each user can have their own Hoiio Numbers!

The process of subscribing to a Hoiio Number is as follows: you first ask for a list of available Hoiio Numbers for a certain country, then tell us the number you want to subscribe to. You can extend an existing subscription by subscribing again.

Tags: ,
Posted by:

Sending SMS for non-developers

February 10, 2012

Our SMS API is so easy that even non-developers can put it to use, in just a few minutes.

In short, all you need to do is to form up an URL like this:

https://secure.hoiio.com/open/sms/send?dest=6590000000&msg=Hoiio+World&app_id=MY_APP_ID&access_token=MY_ACCESS_TOKEN

For non-developers, don’t be frightened by “API”. It is actually very easy, and I am going to guide you in the following 3 steps.

1) Register Hoiio

If you have not done so, register for Hoiio first. Don’t worry, it is free, and even comes with US$8 credits!

2) Create your App

Create an app from the developer portal. When you create an app, you will be given an App ID and Access Token (screenshot). Copy that down for Step 3.

3) Enter URL into your browser

You need to form up the URL. Gather these 4 pieces of information

  • app_id: From step 2
  • access_token: From step 2
  • dest: The phone number to send to
  • msg: The SMS message

If you want to send “Hoiio World” (msg) to +6590000000 (dest), the URL will look like the following:

https://secure.hoiio.com/open/sms/send?dest=6590000000&msg=Hoiio+World&app_id=MY_APP_ID&access_token=MY_ACCESS_TOKEN

Edit the URL with your 4 pieces of information, then copy & paste into your web browser.

Tada~ The SMS will be sent!

PS: This post is a follow-up to Making a Phone Call for non-developers..

Tags:
Posted by:

Adding SMS Support to Rest of the World

February 08, 2012

We have added support for another 77 countries!

These are some countries that were added: Afganistan, Botswana, Haiti, Somalia, Puerto Rico, Tajikistan, Myanmar, etc.. you can also check out their pricing, using our revamped website.

With the new additions, you can now use SMS API to send to 277 countries! That is very likely all the countries that we can ever support. If there is any country that we are still missing, let us know.

But hey, I doubt it :)

Tags: ,
Posted by:

Hoiio API Showcase: SmartInsurance

February 07, 2012

Hey all drivers.

Will like to introduce you all to the Smart way to renew your car Insurance. Recently, I have also use this service to get new quotations for my 3 year old Kia Cerato Forte. And the offering is pretty good and the service is great. They even have a cute lady with a nice voice calling me at the end of the day to ask me if I needed any further help on my car insurance renewal =) Personal and Cool.

http://www.smartinsurance.sg/

I am also glad that they are using the Hoiio API to empower their products. You see, to prevent the cute lady from losing her coolness and her nice voice, they have also setup a Number Authentications systems to filter the real human buyers from all the noises on the Internet. Pretty cool trick =)

Tags:
Posted by:

Hoiio API Showcase: TaskAmigo

February 06, 2012

Hey Cool Guys and Gals,

Just learned a new word (Amigo) and a new Service (TaskAmigo) today. Accordingly to Google, Amigo is Spanish for friends. Hence, TaskAmigo is a service to find friends to help you complete tasks. Need to clean the toilet? No problem, TaskAmigo is here to help. This service is currently under Beta. Do check it out.

http://www.taskamigo.com/

One would wonder. How does TaskAmigo coordinate all the tasks real time between the People who need help and the Amigos? Well, they just signed up for Hoiio Cloud Communication API and we feel excited to be part of this new and cool service coming up. Cheers.

Tags:
Posted by: