Created
June 13, 2013 16:22
-
-
Save iraSenthil/5775108 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
public class MainActivity extends Activity implements OnClickListener { | |
private Button button; | |
private WebView webView; | |
private final static String CLIENT_ID = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
private final static String CLIENT_SECRET = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
private final static String CALLBACK_URL = "com.example.runkeeperapi://RunKeeperIsCallingBack"; | |
@SuppressLint("SetJavaScriptEnabled") | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
//Force to login on every launch. | |
CookieManager cookieManager = CookieManager.getInstance(); | |
cookieManager.removeAllCookie(); | |
button = (Button) findViewById(R.id.button); | |
webView = (WebView) findViewById(R.id.webView); | |
//This is important. JavaScript is disabled by default. Enable it. | |
webView.getSettings().setJavaScriptEnabled(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment