I am using titanium to develop android application.
In my application i have to make call from the application.
I am writing Java Script to develop application.
So My question is is there any way by which i can make call from my application when i am using titanium,as we can do in native android code by calling Intent to call to specific number.
Thanks,
Rakesh
Yes you can make call like this:
Ti.Platform.openURL('tel://911');
Or For Prompt,
Ti.Platform.openURL('telprompt://911');
For more details Titanium Platform
I found this, maybe it's the way on android:
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_CALL,
data: 'tel:12421342'
});
Ti.Android.currentActivity.startActivity(intent);
I've not tried it yet. Good luck!
(Aase
Related
I am creating local notifications but they have a custom probe. Unfortunately the local notification plugin cannot add a custom sound for android. I am using the android apis from nativescript to be able to launch the notifications which work fine. But pressing the notification does not return me to the app. Or I don't know if there is any way to do this from nativescritp
Get the packageName and from the packageManager get: getLaunchIntentForPackage from the packageName. let context=Application.android.context; let packageName=context.getPackageName(); let pg=context.getPackageManager(); let intent=pg.getLaunchIntentForPackage(packageName);
I have a phonegap built android app made of html5 and javascript, i want to launch instagram app onclcik of a button.How is it possible without writing code in java?
There is a plugin for that. Check out this link: https://github.com/dmedvinsky/cordova-startapp.
Add it to your project, then simply call
window.startapp.start(
{
android: com.instagram.android',
ios: 'instagramURL'
},
successCallback, failureCallback
);
(you need to change the ios-url and the callbacks)
I created Android App that is made by cocos2d-x.
I'd like to implement cooperation function with social network service (facebook and twitter )
For example, Like! button which separate news feed.tweet function.
But This function turned out to be a can of worms which I couldn't finish.
I found EziSocial. but I can't find any hints.
would you give me a
description of how to use and method of attach to existing app
We have series of tutorials available on our website. http://ezibyte.com/tutorials/
Disclaimer: I am the creator of EziSocial Plugin
I am new in titanium alloy development project, we already have an android app which was built on titanium template. I would like change this to alloy template.
My current issue is I need to make a user authentication. In our default app we use the following code
var xhr=Titanium.Network.createHTTPClient();
xhr.onerror = function(e){
Ti.API.error('Bad Sever =>'+e.error);
};
xhr.open("POST","http://xxxxxxxxx.com/api/login/");//ADD your URL
xhr.setRequestHeader("Set-Cookie", "application/json");
var param={ "username":$.email.value,"password":$.password.value,"api":true,"type":'P' };
Ti.API.info('Params'+JSON.stringify(param));
xhr.send(param);
Can I do same method in alloy app as well? Or have any other good methods?
If I use the same method I will get JSON response from API. Once logged in I would like to switch to new window.
Here I am using the code below to create new window.
var newwindow = Alloy.createController('threadShow');
newwindow.getView().open();
Is it right method? Or do have any other methods? How can I check whether user is authenticated or not in all controller? Or do we have any method like session as in web development project?
Yes that's ok, at the end of the day, Alloy is built on top of traditional Titanium and is not intending to replace it, just use commonJS and other best practices and you'll be fine
I am using Embarcadero's HTML5Builder for Android server mobile apps development.
How can i use Mobile Hardware components, like: MNotification.
i need some useful code to use MNotification.
Just give a value to the Message property from the Form Designer, and call ComponentNameNotification() from a JavaScript event, where ComponentName is the name of the MNotification component.
For example:
function MButton1JSClick($sender, $params)
{
?>
//begin js
MNotification1Notification();
//end
<?php
}
Note that hardware components only work inside PhoneGap. The notification will show in an application generated with the Mobile Deployment wizard, but not in a web browser.
SO WHAT TO DO:
Download the SDK ADT Bundle for Windows
http://developer.android.com/sdk/index.html
Download PhoneGap
http://phonegap.com/download
And use this instructions:
1) http://www.youtube.com/watch?v=lVjCMXQGS_w
2) http://www.youtube.com/watch?v=HO_59WXg33g
Thank's to all who trying to help me!