Android Open Source - CloudCopyPaster Options






From Project

Back to project page CloudCopyPaster.

License

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.

Java Source Code

package com.newbilius.WinCopyPast;
/*from  w w w  .ja va 2s .  co m*/
import android.content.Context;
import android.content.SharedPreferences;
import com.google.inject.Inject;

public class Options {
//SET YOU SERVER SENDER ID!
    //public static final String SENDER_ID="";
    public static final String URL="http://cloud-paster.com/save.php";

    @Inject SharedPreferences ProgramOptions;

    public String getLogin(){
        return ProgramOptions.getString("Login", "");
    }

    public String getPass(){
        return ProgramOptions.getString("Password","" );
    }

    public boolean getVibration(){
        return ProgramOptions.getBoolean("Vibration", true);
    }

    public void setVibration(boolean value){
        SharedPreferences.Editor ed = ProgramOptions.edit();
        ed.putBoolean("Vibration",value);
        ed.commit();
    }

    public boolean getSound(){
        return ProgramOptions.getBoolean("Sound",true);
    }

    public void setSound(boolean value){
        SharedPreferences.Editor ed = ProgramOptions.edit();
        ed.putBoolean("Sound",value);
        ed.commit();
    }

    public boolean getInstantCopy(){
        return ProgramOptions.getBoolean("InstantCopy",false);
    }

    public void setInstantCopy(boolean value){
        SharedPreferences.Editor ed = ProgramOptions.edit();
        ed.putBoolean("InstantCopy",value);
        ed.commit();
    }

    public String getNotificationId(){
        return ProgramOptions.getString("KEY","" );
    }

    public void setNotificationId(String id){
        SharedPreferences.Editor ed = ProgramOptions.edit();
        ed.putString("KEY", id);
        ed.commit();
    }

    public void setParams(String login, String password){
        SharedPreferences.Editor ed = ProgramOptions.edit();
        ed.putString("Login",login);
        ed.putString("Password",password);
        ed.commit();
    }
}




Java Source Code List

android.UnusedStub.java
com.newbilius.WinCopyPast.AboutActivity.java
com.newbilius.WinCopyPast.Analytics.java
com.newbilius.WinCopyPast.ConfigActivityController.java
com.newbilius.WinCopyPast.ConfigActivity.java
com.newbilius.WinCopyPast.GcmBroadcastReceiver.java
com.newbilius.WinCopyPast.GetTextToBufferReceiver.java
com.newbilius.WinCopyPast.Log.java
com.newbilius.WinCopyPast.Net.java
com.newbilius.WinCopyPast.OnComplete.java
com.newbilius.WinCopyPast.Options.java
com.newbilius.WinCopyPast.PushNotification.java