Back to project page CloudCopyPaster.
The source code is released under:
Copyright (c) 2014, Dima Moiseev Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of s...
If you think the Android project CloudCopyPaster listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.newbilius.WinCopyPast; // w ww .j a va2 s .c o m import android.app.Activity; import android.content.Context; import javax.inject.Inject; public class ConfigActivityController { @Inject Options options; @Inject PushNotification pushNotification; public boolean GetStatus(){ return !options.getNotificationId().isEmpty(); } public String GetButtonText(Context context){ if (!options.getNotificationId().isEmpty()){ return context.getResources().getString(R.string.button_on); }else{ return context.getResources().getString(R.string.button_off); } } public void ChangeParams(String login, String password, Activity activity, OnComplete onComplete){ boolean status=GetStatus(); if (login.isEmpty() || password.isEmpty()){ onComplete.Error(activity.getBaseContext().getString(R.string.error_empty_field)); }else{ options.setParams(login,password); if (status){ options.setNotificationId(""); onComplete.Complete(); }else{ pushNotification.register(activity,Options.SENDER_ID,options.getNotificationId(),onComplete); } } } }