Hi,
I try to open twitter users feed. Width
var myAccounts = require('org.bcbhh').getAccounts(); var twitter = null; for (var i = 0; i < myAccounts.length; i++) { if (myAccounts[i].accountType == 'Twitter') twitter = myAccounts[i].name; }I can detect if twitter account is available and the name of account. Now I can open an intent – this is native solution:
Intent intent = null; try { this.getPackageManager().getPackageInfo("com.twitter.android", 0); intent = new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://user?user_id=USERID")); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } catch (Exception e) { intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/")); } this.startActivity(intent);How can I achieve this in Titanium?