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
<declare-styleable name="MinhaCustomView"> | |
<attr name="atributo_um"/> | |
<attr name="atributo_dois" format="boolean"/> | |
<attr name="atributo_tres" format="string" /> | |
</declare-styleable> |
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
adb shell |
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
adb shell monkey [options] <event-count> |
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
adb shell monkey -p com.tumblr.juliozynger.apptestermonkey -v 2000 |
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
adb kill-server | |
adb start-server |
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
ACLMessage msg = new ACLMessage(ACLMessage.INFORM); | |
msg.addReceiver(new AID("Julio", AID.ISLOCALNAME); | |
msg.setLanguage("Portugues"); | |
msg.setContent("Olá mundo! Esta é minha primeira ACLMessage!"); | |
send(msg); |
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
ACLMessage msg = receive(); | |
if (msg != null) { | |
// Processar a mensagem | |
String conteudo = msg.getContent(); | |
System.out.println(conteudo); | |
// imprimirá "Olá mundo! Esta é minha primeira ACLMessage!" | |
// no caso da mensagem https://gist.github.com/julioz/5736814 | |
} |
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
compile 'com.google.apis:google-api-services-androidpublisher:v2-rev24-1.21.0' |
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
NetHttpTransport http = GoogleNetHttpTransport.newTrustedTransport(); | |
JacksonFactory json = JacksonFactory.getDefaultInstance(); | |
Set<String> scopes = Collections.singleton(AndroidPublisherScopes.ANDROIDPUBLISHER); | |
File secretFile = new File(Constants.SECRET_FILE_PATH); | |
GoogleCredential credential = new GoogleCredential.Builder(). | |
setTransport(http). | |
setJsonFactory(json). | |
setServiceAccountPrivateKeyId(Constants.KEY_ID). |
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
NetHttpTransport http = GoogleNetHttpTransport.newTrustedTransport(); | |
JacksonFactory json = JacksonFactory.getDefaultInstance(); | |
GoogleCredential credential = ... | |
AndroidPublisher publisher = new AndroidPublisher.Builder(http, json, credential). | |
setApplicationName(PACKAGE). | |
build(); |
OlderNewer