App Development Steps
 
Step1
 
Provide one or more icons for display
 
Developers can have a maximum of three icons for an app. In the widglet code developers have to specify which app icon to display in the tray using iconindex.
 

Iconindex

Icon

0icon1
1icon2
2icon3
	
        Example:
        
                 var dinfo = {
                        visible:true, 
                        iconIndex: 0, 
                        tooltip: "Tooltip"
                 };
 
The appropriate size for the icon is 38 x 38. It is better for the developers to create 38 x 38 size icon and upload it. We are supporting .gif, .jpg and .png files.
 
Step2
 
Provide the widgelet code
 
Click here to see widgelet samples.
 
Step3
 
Provide the Call Back URL
 
The callback URL is nothing but the app hosting URL. It's the URL to your developed app.
 
 
Sample Hello World Application
 
 

Icon

Widgelet code

/*
 * Hello World demo
 * 
 * upon user click, the application shows the overlay with hello world text
 * 
 */
var overlayId = null;

//To store overlay reference Id and previously selected data.

//Function that will call by the RA to set the app display details
function App_init() {
    var dinfo = {
        visible:true, 
        iconIndex: 0, 
        tooltip: "Hello World"
    };
    RoamAbout.setAttribute("display", dinfo);
}

//To return the display details
function App_getDisplayInfo() {
    return RoamAbout.getAttribute("display");
}

//It gets called once the user clicks on your Application icon in the RoamAbout Tray
function App_handleClick() {   
        if (overlayId == null)
                {				
                RoamAbout.createOverlay(function(status, data, context)
                {overlayCreated(status, data, context);}, null, 300, 220, '');
                }
                else if (overlayId != null )
                {
                RoamAbout.destroyOverlay(function(status, data, context)
                {overlayDestroyed(status, data, context);}, null, overlayId);
                }
        return 0;
}

//RA will notify you once the user closed your app overlay
function App_notify(notification) {
        if (notification == RA_notification_overlayClosed)
                overlayId = null;
        return 0;
}
        
//Callback function for create overlay to get the overlay id
function overlayCreated(status, data, context) {
    overlayId = data;
}

//Callback function for destroy overlay.
function overlayDestroyed(status, data, context) {
    overlayId = null;
}
    
 

Callback URL