-
-
Save dawsontoth/370939b6e54dadf6f5a9 to your computer and use it in GitHub Desktop.
"Sharing" test case in Appcelerator Titanium for Android
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 win = Ti.UI.createWindow({ navBarHidden: true, layout: 'vertical' }); | |
win.add(Ti.UI.createLabel({ text: '1. Leave this app and "Share" some text.', top: 20 })); | |
var button = Ti.UI.createButton({ title: '2. Touch me to crash the application.', top: 20 }); | |
button.addEventListener('click', function() { | |
Ti.UI.createActivityIndicator({ | |
message: '3. This alert should crash the app.' | |
}).show(); | |
}); | |
win.add(button); | |
win.open(); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<ti:app xmlns:ti="http://ti.appcelerator.org"> | |
<id>com.dawson.playgroundmobile</id> | |
... | |
<android xmlns:android="http://schemas.android.com/apk/res/android"> | |
<activities> | |
<activity url="shareActivity.js"> | |
<intent-filter> | |
<action android:name="android.intent.action.SEND"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
<data android:mimeType="text/plain"/> | |
</intent-filter> | |
</activity> | |
</activities> | |
</android> | |
</ti:app> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment