Created
March 11, 2017 16:30
-
-
Save v3ss0n/871241e3905b602765192074280c4b41 to your computer and use it in GitHub Desktop.
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
/* | |
Licensed to the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF licenses this file | |
to you 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, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
KIND, either express or implied. See the License for the | |
specific language governing permissions and limitations | |
under the License. | |
*/ | |
package com.hexyn.hover; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.graphics.Color; | |
import android.os.Bundle; | |
import android.webkit.JavascriptInterface; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
import android.widget.Button; | |
import android.widget.Toast; | |
import com.hover.sdk.buttons.BuyButton; | |
import com.hover.sdk.main.HoverParameters; | |
import org.apache.cordova.*; | |
import org.apache.cordova.engine.SystemWebViewEngine; | |
import org.json.JSONArray; | |
import org.json.JSONException; | |
public class MainActivity extends CordovaActivity { | |
@JavascriptInterface | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
super.init(); | |
Bundle extras = getIntent().getExtras(); | |
if (extras != null && extras.getBoolean("cdvStartInBackground", false)) { | |
moveTaskToBack(true); | |
} | |
loadUrl(launchUrl); | |
// Set by <content src="index.html" /> in config.xml | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment