This file contains hidden or 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 static String decrypt(byte[] cipherText, String encryptionKey) throws Exception{ | |
| Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding", "SunJCE"); | |
| SecretKeySpec key = new SecretKeySpec(encryptionKey.getBytes("UTF-8"), "AES"); | |
| cipher.init(Cipher.DECRYPT_MODE, key,new IvParameterSpec(IV.getBytes("UTF-8"))); | |
| return new String(cipher.doFinal(cipherText),"UTF-8"); | |
| } |
This file contains hidden or 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
| package com.chocolabs.sinkuan.pojo; | |
| public class ChocoDeepLinking<T extends Enum<?>> { | |
| private String appName; | |
| private String pageName; | |
| private T action; | |
| private String[] keyWord; | |
| public ChocoDeepLinking(String appName, String pageName, String action, | |
| String... keyWord) { |
This file contains hidden or 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
| package com.chocolabs.chocosdk.deeplinking.pojo; | |
| import java.io.Serializable; | |
| import java.util.HashMap; | |
| import java.util.Iterator; | |
| import org.json.JSONException; | |
| import org.json.JSONObject; | |
| public class ChocoAction<P extends Enum<P>,A extends Enum<A>> implements Serializable{ | |
| /** |
This file contains hidden or 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
| RequestQueue mQueue = Volley.newRequestQueue(this); | |
| String url = CommonUtilities.API+"portal?v=40&mso="+FliprXApplication.mso+"&lang=zh"+"&time="+new Date().getHours(); | |
| StringRequest stringRequest = new StringRequest(url, | |
| new Response.Listener<String>() { | |
| @Override | |
| public void onResponse(String response) { | |
| try{ | |
| setInfos = CSV_Parse.parseToSetInfo(response); | |
| if(navigationDrawerFragment != null){ | |
| navigationDrawerFragment.setSetInfos(setInfos); |
This file contains hidden or 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
| { | |
| @Override | |
| public Map<String, String> getHeaders() throws AuthFailureError { | |
| Map<String, String> headers = super.getHeaders(); | |
| Map<String, String> newHeaders = new HashMap<String, String>(); | |
| newHeaders.putAll(headers); | |
| newHeaders.put("User-Agent", "Mozilla/5.0"); | |
| return newHeaders; | |
| }; | |
| } |
This file contains hidden or 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
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.util.concurrent.Callable; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.Future; | |
| public class CallableAndFuture |
This file contains hidden or 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
| android { | |
| compileSdkVersion 21 | |
| buildToolsVersion "21.1.2" | |
| defaultConfig { | |
| applicationId "tv.tv9x9.fliprX" | |
| minSdkVersion 15 | |
| targetSdkVersion 21 | |
| versionCode 53 | |
| versionName "0.8.15" |
This file contains hidden or 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
| applicationVariants.all { variant -> | |
| variant.outputs.each { output -> | |
| output.outputFile = new File( | |
| output.outputFile.parent, | |
| output.outputFile.name.replace(".apk", "-${variant.versionName}.apk")) | |
| } | |
| } | |
| productFlavors { | |
| fliprX { |
This file contains hidden or 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
| package tw.guodong.snowphoto.adapter; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.AdapterView; | |
| import android.widget.ImageView; | |
| import tw.guodong.snowphoto.R; |
This file contains hidden or 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
| private WindowManager windowManager; | |
| private WindowManager.LayoutParams wmParams; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main); | |
| view = findViewById(R.id.textView); | |
| windowManager = (WindowManager) getApplication().getSystemService(WINDOW_SERVICE); |
OlderNewer