This file contains hidden or 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
| # built application files | |
| *.apk | |
| *.ap_ | |
| # files for the dex VM | |
| *.dex | |
| # Java class files | |
| *.class |
This file contains hidden or 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
| mWebView.setWebChromeClient(new WebChromeClient() { | |
| public boolean onConsoleMessage(ConsoleMessage cm) { | |
| Log.d("JS-ConsoleLog", cm.message() + " -- From line " | |
| + cm.lineNumber() + " of " | |
| + cm.sourceId() ); | |
| return true; | |
| } | |
| }); |
This file contains hidden or 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"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.test.speedtest" | |
| android:versionCode="1" | |
| android:versionName="1.0" | |
| > | |
| <uses-sdk android:minSdkVersion="11" /> | |
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | |
| <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> |
This file contains hidden or 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
| public IEnumerable<IDevice> GetDevices() | |
| { | |
| var devices = new List<IDevice>(); | |
| var androidDevices = Http.Get<AndroidPushIdCollection>(GetApiUrl("apids/"), WithMasterSecret).Apids; | |
| var iosDevices = Http.Get<DeviceTokenCollection>(GetApiUrl("device_tokens/"), WithMasterSecret).Device_Tokens; | |
| devices.AddRange(androidDevices); | |
| devices.AddRange(iosDevices); |
This file contains hidden or 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
| User-Agent: Fiddler | |
| Authorization: Basic <key:mastersecret> | |
| Host: go.urbanairship.com | |
| GET https://go.urbanairship.com/api/device_tokens/ - (For IOS devices) | |
| GET https://go.urbanairship.com/api/apids/ - (For Android devices) |
This file contains hidden or 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
| public void CreateTag(string tag) | |
| { | |
| Http.Put(GetApiUrl(string.Format("tags/{0}", tag)), WithSecret); | |
| } |
This file contains hidden or 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
| User-Agent: Fiddler | |
| Authorization: Basic <key:applicationsecret> | |
| PUT - https://go.urbanairship.com/api/tags/{tag} |
This file contains hidden or 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
| public void Broadcast(string message, Dictionary<string,string> extras) | |
| { | |
| var iosBroadcast = new Dictionary<string, object> {{"aps", new {alert = message}}}; | |
| var androidBroadcast = new {android = new {alert = message}, extra = extras}; | |
| foreach (var kvp in extras) | |
| { | |
| iosBroadcast.Add(kvp.Key, kvp.Value); | |
| } |
This file contains hidden or 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
| User-Agent: Fiddler | |
| Authorization: Basic <key:secret> | |
| Content-Type: applicaiton/json | |
| Host: go.urbanairship.com | |
| Content-Length: 16 | |
| PUT - https://go.urbanairship.com/api/apids/{apid} (Android) | |
| PUT - https://go.urbanairship.com/api/device_tokens/{device_token} (iOS) | |
| Request Body iOS: |