use of ingage.ingage20.managers.WifiManager in project iNGAGE by davis123123.
the class LoginActivity method onCreate.
// String thread_subs;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_in);
session = new SessionManager(getApplicationContext());
wifiManager = new WifiManager(getBaseContext());
usernameEt = (EditText) findViewById(R.id.username);
passwordEt = (EditText) findViewById(R.id.password);
LoginEt = (Button) findViewById(R.id.sign_in_button);
signUpTV = (TextView) findViewById(R.id.signIn_textView_CreateNewAccount);
signUpTV.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (wifiManager.checkInternet())
goSignUp();
else
wifiErrorDialog();
}
});
LoginEt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (view == LoginEt) {
if (wifiManager.checkInternet())
OnLogin();
else
wifiErrorDialog();
}
}
});
}
use of ingage.ingage20.managers.WifiManager in project iNGAGE by davis123123.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContext = getApplicationContext();
session = new SessionManager(mContext);
session.checkLogin();
setContentView(R.layout.activity_main);
setupToolbar(savedInstanceState);
/**
*RecyclerView (TEMPORARY, MOVE TO A FRAGMENT LATER)*
*/
ListView lvItems;
wifiManager = new WifiManager(getBaseContext());
if (wifiManager.checkInternet()) {
parseJSON();
setupNavigationMenu(savedInstanceState);
setupNavigationDrawer();
session.updatePage(pageType);
/* initilize FrontPage Fragment*/
fragmentManager = this.getSupportFragmentManager();
final Class fragmentClass = FrontPageFragment.class;
final Fragment fragment = Fragment.instantiate(this, fragmentClass.getName());
fragmentManager.beginTransaction().replace(R.id.main_fragment_container, fragment, fragmentClass.getSimpleName()).setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN).commit();
initTabs();
initAnnouncement();
}
// Set the title for the fragment.
final ActionBar actionBar = this.getSupportActionBar();
if (actionBar != null) {
actionBar.setTitle(getString(R.string.app_name));
}
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
UserProfileActivity.recentComments.clear();
// viewPager = (ViewPager) findViewById(R.id.viewpager);
// setupViewPager(viewPager);
// tabLayout.setupWithViewPager(viewPager);
}
use of ingage.ingage20.managers.WifiManager in project iNGAGE by davis123123.
the class SignUpActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_up);
mFullName = (EditText) findViewById(R.id.sign_up_full_name);
mUserName = (EditText) findViewById(R.id.sign_up_username);
mPassword = (EditText) findViewById(R.id.sign_up_password);
mRePassword = (EditText) findViewById(R.id.retype_password);
mEmail = (EditText) findViewById(R.id.sign_up_email);
mSignUp = (Button) findViewById(R.id.sign_up_button);
wifiManager = new WifiManager(getBaseContext());
mSignUp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (view == mSignUp) {
if (wifiManager.checkInternet())
onRegister();
else
wifiErrorDialog();
}
}
});
}
Aggregations