Skip to content

Instantly share code, notes, and snippets.

View easterapps's full-sized avatar
🎮
coding

Jakob Haubold easterapps

🎮
coding
View GitHub Profile
appcenter distribute releases edit \
--app <username_or_organization>/<application_identifier> \
-r <number> \
--token <TOKEN>\
disabled|enabled
appcenter crashes upload-mappings \
--mapping {mapping file} \
--app <username_or_organization>/<application_identifier> \
--version-name {version name}\
@easterapps
easterapps / ActivityRestart.kt
Last active March 23, 2024 18:44
restart android application programmatically
fun triggerRestart(context: Activity) {
val intent = Intent(context, MainActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity(intent)
if (context is Activity) {
(context as Activity).finish()
}
Runtime.getRuntime().exit(0)
}
@easterapps
easterapps / sample_dialogflow_v2.php
Created July 31, 2018 15:27
sample dialogflow v2 php webhook
<?php
include('Webhook.php');
$webhook = new Webhook('<your Google project id>');
$webhook->build_simpleResponse('Voice Text', "Display Text?");
$webhook->build_suggestions('Suggestion 1');
$webhook->build_suggestions('Suggestion 2');
@easterapps
easterapps / dialogflow_webhook_v2.php
Last active September 21, 2022 08:30
Simple PHP Webhook for Dialogflow v2 - Actions on Google
<?php
class Webhook {
public $decodedWebhook = null;
public $googleUserId = false;
// Other
public $hasResponded = false;
private $platforms = array('PLATFORM_UNSPECIFIED');
@easterapps
easterapps / dialogflow_webhook_v1.php
Created July 30, 2018 21:30
Simple PHP Webhook for Dialogflow v1
function processMessage($update) {
if($update["result"]["action"] == "test.welcome"){
sendMessage(array(
"source" => $update["result"]["source"],
"speech" => "Hello World!",
"displayText" => "Hello World!",
"contextOut" => array()
));
}
}