This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var on_url = function(e){ | |
var dialog = Ti.UI.createAlertDialog({ | |
message: 'URL Received ['+e.url+']!', | |
ok: 'OK', | |
title: 'Hipmob' }); | |
dialog.show(); | |
setTimeout(function(){ dialog.hide(); }, 5000); | |
}; | |
chatView.addEventListener(hipmob.EVENT_URL_RECEIVED, on_url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(iphone){ | |
chatView.addEventListener(hipmob.EVENT_KEYBOARD_SHOW, function(data){ | |
chatView.animate({height: win.rect.height - data.height, duration: data.duration * 1000 }); | |
}); | |
chatView.addEventListener(hipmob.EVENT_KEYBOARD_HIDE, function(data){ | |
chatView.animate({ height: win.rect.height, duration: data.duration * 1000 }); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var appId = "7152ce24a16d42eb8d30b5fe4c01f911"; | |
var chatView = hipmob.createHipmobChatView({ | |
top: 0, | |
left: 0, | |
height: Ti.UI.FILL, | |
width: Ti.UI.FILL, | |
appId: appId, | |
name: "User name", | |
email: "useremail@example.com", | |
context: "starting up with Appcelerator", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var android = Ti.Platform.osname == 'android'; | |
var iphone = Ti.Platform.osname == 'iphone'; | |
var hipmob = false; | |
if(android || iphone) hipmob = require("com.hipmobtitanium"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<modules> | |
<module platform="android" version="0.7.0">com.hipmobtitanium</module> | |
<module platform="iphone" version="0.7.0">com.hipmobtitanium</module> | |
</modules> |