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
package com.firebaseapp.twademo; | |
import android.content.ComponentName; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.annotation.Nullable; | |
import android.support.customtabs.CustomTabsClient; | |
import android.support.customtabs.CustomTabsIntent; | |
import android.support.customtabs.CustomTabsServiceConnection; |
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
private class TwaCustomTabsServiceConnection extends CustomTabsServiceConnection { | |
@Override | |
public void onCustomTabsServiceConnected(ComponentName componentName, CustomTabsClient client) { | |
// Creates a CustomTabsSession with a constant session id. | |
CustomTabsSession session = client.newSession(null, SESSION_ID); | |
// Creates a CustomTabsIntent to launch the Trusted Web Activity. | |
mCustomTabsIntent = new CustomTabsIntent.Builder(session).build(); | |
} |
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
CustomTabsIntent.Builderbuilder=new CustomTabsIntent.Builder(); | |
CustomTabsIntentcustomTabsIntent=builder.build(); | |
TrustedWebUtils.launchAsTrustedWebActivity( | |
MainActivity.this, | |
customTabsIntent, | |
Uri.parse("https://twa-demo.firebaseapp.com/")); |
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 { | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
implementation 'com.android.support:appcompat-v7:28.0.0' | |
implementation 'com.android.support.constraint:constraint-layout:1.1.3' | |
implementation 'com.android.support:design:28.0.0' | |
implementation 'com.github.GoogleChrome:custom-tabs-client:7ab7178ae0c4858d15b1918bded4dd5cac758870' | |
testImplementation 'junit:junit:4.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
allprojects { | |
repositories { | |
google() | |
jcenter() | |
maven { url "https://jitpack.io" } | |
} | |
} |
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
java -jar swagger-codegen-cli-2.2.1.jar generate \ | |
-i https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector/Swagger/ConnectorAPI.json \ | |
-l java --library=retrofit2 \ | |
--api-package com.microsoft.bot.connector.connectorapi \ | |
--model-package com.microsoft.bot.connector.connectorapi.model \ | |
--group-id com.microsoft.bot \ | |
--artifact-id connectorapi \ | |
--artifact-version 1.0.0 \ | |
-o /var/tmp/java/okhttp-gson/ |
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
[Serializable] | |
public class HotelSearch | |
{ | |
[Prompt("Where would like to stay?")] | |
public string Location { get; set; } | |
[Prompt("When is your check-in date?")] | |
public DateTime CheckinDate { get; set; } |
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
<iframe src="https://webchat.botframework.com/embed/TravelJapan?s=YOUR_SECRET_HERE" style="height: 502px; max-height: 502px;"> | |
</iframe> |
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
package org.gradle.sample; | |
import org.gradle.tooling.*; | |
import org.gradle.tooling.model.*; | |
import org.gradle.tooling.model.eclipse.*; | |
import java.io.File; | |
import java.lang.Object; | |
public class Main { |
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 sealed partial class MainPage | |
{ | |
public MainPage() | |
{ | |
InitializeComponent(); | |
} | |
private void AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) | |
{ | |
// Only get results when it was a user typing, |
NewerOlder