Android Open Source - roborouter Login Activity

From Project

Back to project page roborouter.


The source code is released under:

Apache License

If you think the Android project roborouter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.raycoarana.roborouter.sample;
/*from  w  w w  .java  2  s .  c  o m*/
import android.accounts.Account;
import android.accounts.AccountManager;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

import com.raycoarana.roborouter.RoboRouter;

    Copyright 2014 Rayco Araa

    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

    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.

public class LoginActivity extends Activity {

  public static final String ACCOUNT_TYPE = "com.raycoarana.roborouter.sample.account";

  private AccountManager mAccountManager;

  protected void onCreate(Bundle savedInstanceState) {

    mAccountManager = (AccountManager) getSystemService(Activity.ACCOUNT_SERVICE);

    findViewById( OnClickListener() {
      public void onClick(View view) {

  private void doLogin() {
    //Do your login stuff
    Account account = new Account("sample", ACCOUNT_TYPE);
    mAccountManager.addAccountExplicitly(account, "1234", new Bundle());

    //When done, continue


Java Source Code List