Skip to content

Instantly share code, notes, and snippets.

View KleversonNascimento's full-sized avatar

klev KleversonNascimento

  • QuintoAndar
  • Santo André, SP - Brasil
View GitHub Profile
@KleversonNascimento
KleversonNascimento / LauncherActivity.java
Created May 21, 2019 04:05
LauncherActivity.java modified
// Copyright 2018 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@KleversonNascimento
KleversonNascimento / LauncherActivity.java
Created May 6, 2019 05:11
LauncherActivity for TWA
// Copyright 2018 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@KleversonNascimento
KleversonNascimento / AndroidManifest.xml
Created May 6, 2019 04:44
AndroidManifest after changes
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.package.name.example">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
@KleversonNascimento
KleversonNascimento / AndroidManifest.xml
Last active May 6, 2019 04:42
AndroidManifest before changes
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.package.name.example">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
function isTWA() {
if (window.document.referrer === 'com.package.name.example') {
return true;
}
return false;
}
export default isTWA;