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
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.simplegeo</groupId> | |
| <artifactId>java-simplegeo</artifactId> | |
| <version>2.2</version> | |
| <packaging>jar</packaging> | |
| <url>https://simplegeo.com</url> | |
| <licenses> | |
| <license> |
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
| <dependencies> | |
| ... | |
| <dependency> | |
| <groupId>com.simplegeo</groupId> | |
| <artifactId>java-simplegeo</artifactId> | |
| <version>3.0</version> | |
| </dependency> | |
| ... | |
| </dependencies> |
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
| $ cd ~/path/to/java-simplegeo | |
| $ mvn package -Dmaven.test.skip=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
| 1318 NotificationService W error loading sound for file:///android_asset/cat.wav | |
| 1318 ion: Prepare failed. W status=0x1 | |
| 1318 NotificationService W at android.media.MediaPlayer.prepare(Native Method) | |
| 1318 NotificationService W at com.android.server.NotificationPlayer$CreationAndCompletionThread.run(NotificationPlayer.java:90) |
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
| 11:31 AM S3nsat10n | |
| Do you have to create an IDL in order to interact with a service running in another process inside your own app? Or can you bind to it like you would a service running in the main process? | |
| 11:31 AM evancharlton | |
| you can just bind to it | |
| 11:31 AM lov | |
| S3nsat10n: it depends. | |
| 11:31 AM pfn | |
| S3nsat10n, another process = need idl | |
| 11:31 AM evancharlton | |
| IDL is pretty much just for IPC as far as I know |
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
| caseycrites@montana:~/ua% curl -X POST -u "gmho5E0CRsOnWr1kPzEFcQ:jZ1ZAxqyQgqzusCeUlh4Hw" -H "Content-type: application/json" --data '{"aliases": ["homecoming_ua_demo"], "android": {"alert": "command line, bitches."}}' https://go.urbanairship.com/api/push/ | |
| Forbidden% |
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
| if (fileSize < 1024) { | |
| response = parseFloat(fileSize).toFixed(2) + " bytes" | |
| } else if (fileSize < 1048576) { | |
| response = (parseFloat(fileSize)/1024).toFixed(2) + " KB" | |
| } else { | |
| response = (parseFloat(fileSize)/1048576).toFixed(2) + " MB" | |
| } |
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
| DroidCafe cafe = new DroidCafe(new BasicAuth("key", "secret")); | |
| cafe.get("https://go.urbanairship.com/api/apids/d17d5a62-a937-4375-9207-b50f5901ba35/", new Handler() { | |
| @Override | |
| public void handleMessage(Message message) { | |
| HttpResponse result = (HttpResponse) message.obj; | |
| switch (message.what) { | |
| case (DroidCafe.REQUEST_RESULT): | |
| try { | |
| Log.e(TAG, EntityUtils.toString(result.getEntity())); | |
| } catch (IllegalStateException e) { |
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
| >>> def divide(): | |
| ... return 5/0 | |
| ... | |
| >>> def go(): | |
| ... try: | |
| ... return divide() | |
| ... except ZeroDivisionError: | |
| ... return "divided by zero" | |
| ... | |
| >>> go() |
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"?> | |
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="fill_parent" | |
| android:layout_height="?android:attr/listPreferredItemHeight" | |
| android:padding="6dip" > | |
| <LinearLayout | |
| android:id="@+id/unread_indicator" | |
| android:layout_width="4dp" | |
| android:layout_height="fill_parent" |