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
class MainActivity : AppCompatActivity() { | |
private var result: TextView? =null | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
val str = findViewById(R.id.text) as EditText | |
val button = findViewById(R.id.btn) as Button |
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
<?php | |
require('parser.php'); | |
define('BOT_TOKEN', 'SEU TOKEN'); | |
define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/'); | |
function processMessage($message, $data) { | |
// processa a mensagem recebida | |
$message_id = $message['message_id']; |
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
{"update_id":0000000, | |
"callback_query":{ | |
"id":"0000000000000", | |
"from":{ | |
"id":00000000, | |
"is_bot":false, | |
"first_name":"Luiz Marcus", | |
"language_code":"pt-BR"}, | |
"message":{"message_id":0000, | |
"from":{ |
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
{ | |
"responseId": "77129d7d-33d4-488a-ad08-55555555", | |
"queryResult": { | |
"queryText": "mega", | |
"parameters": { | |
"Jogos": "Mega-Sena" | |
}, | |
"allRequiredParamsPresent": true, | |
"fulfillmentMessages": [{ | |
"text": { |
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
<?php | |
$update_response = file_get_contents("php://input"); | |
$update = json_decode($update_response, true); | |
if (isset($update["queryResult"]["parameters"]["Jogos"])) { | |
echo getResult($update["queryResult"]["parameters"]["Jogos"]); | |
} |
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
define('BASE_URL',"http://g1.globo.com/loterias/"); | |
define('URL_MEGA', BASE_URL.'megasena.html'); | |
define('URL_QUINA', BASE_URL.'quina.html'); | |
define('URL_LOTOMANIA', BASE_URL.'lotomania.html'); | |
define('URL_LOTOCACIL', BASE_URL.'lotofacil.html'); | |
function getResult($lottery){ | |
$out = "Resultado - ".$lottery; |
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
implementation 'ai.api:sdk:2.0.7@aar' | |
implementation 'ai.api:libai:1.6.12' |
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
<uses-permission android:name="android.permission.INTERNET"/> | |
<uses-permission android:name="android.permission.RECORD_AUDIO"/> |
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 class MainActivity extends AppCompatActivity implements AIListener{ | |
@Override | |
public void onResult(AIResponse result) { | |
} | |
@Override | |
public void onError(AIError error) { | |
} |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
textView = findViewById(R.id.textView); | |
button = findViewById(R.id.button); | |
//Setando as configurações | |
final AIConfiguration config = new AIConfiguration("token", |