Posts

volley cache return always null

Image
In order to cache anything with  Volley  you need to have two things: 1) server allows you to cache it. it usually appears in a  cache control tag  in the  HTTP header . 2) you save it or in this scenario you tell the  Volly  to save. so i think your problem is in number one. that means the server dose not allow you to cache those files, in order to confirm my answer you can do one of these things: download this plug in (RESTClient) for  mozilla  and send your request and check the header file for cache control. if the server dose not allow you to cache you will see something like below image,  notice cache control tag set break point in  headerValue = headers.get("Cache-Control");  at  HttpHeaderParse  class and see whats going on when  Volley  wants to parse the  cache control tag .

Installing a LAMP Web Server on AWS EC2 ubuntu instance

Image
Execute following command to update ubuntu Ubuntu is based on Debian, which uses apt not yum which is what Red Hat uses. The Debian equivalent of: yum update -y Would be: sudo apt-get update once ubuntu has been updated, run following command to install complete LAMP stack    on ubuntu, enter yes or ‘y’ when prompted followed by your MySQL password for root user twice, take note of this password for connecting you your databases later. 1. Install Apache sudo apt-get install apache2 To test your web server. In a web browser, enter the public DNS address (or the public IP address) of your instance; you should see the Apache test page 2. Install PHP sudo apt-get install php5 libapache2-mod-php5 3. Install MySQL sudo apt-get install mysql-server 4. Install phpMyAdmin sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin Enter ‘y’ when prompted then select apache2 when prompted followed by no when asked to use default d...

Your strength isn’t held by you alone

A boy and his father were walking through the woods together. They came across a large log, blocking their path. The boy turned to his father and said, “Do you think I can lift this log, Dad?” The father replied, “If you use all your strength, absolutely you can.” The boy rolled up his sleeves, bent his knees, and got his hands under the log. He locked his arms and heaved with every ounce of strength he had. But the log wouldn’t budge. He tried over and over again until at last, exhausted and breathless, he gave up. He looked at his dad with disappointment and frustration and said, “You told me I could lift it!” His dad smiled and said gently, “I told you you could lift it if you used all your strength.  You didn’t ask me for help. ” So the boy asked his dad to help him and together, they lifted the log out of their path. Your strength isn’t held by you alone, but also by the people who march alongside you. When you feel unequal to the task in front of you, perhaps it i...

Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef

Warning:can't write resource [.readme] (Duplicate zip entry [classes.jar:.readme]) Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef I had to revert to 7.8 to fix things and move on with life. It will be great when all of this gets sorted out. I am surprised a major release in incompatible with proguard. Hopefully this will be resolved soon. Use play store version to compile 'com.google.android.gms:play-services:7.8.0' latest version has this issue . Also change app target version to targetSdkVersion 21

Are you sure your NDK_MODULE_PATH variable is properly defined ?

# Note that NDK_MODULE_PATH must contain the patchfield parent directory. The # makefile in PcmSample implicitly takes care of this. LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := pcmsource LOCAL_LDLIBS := -llog LOCAL_SRC_FILES := pcmsource.c LOCAL_STATIC_LIBRARIES := audiomodule include $(BUILD_SHARED_LIBRARY) $(call import-add-path, C:\Users\310151586\Downloads\AudioEnginePitchTest-master\AudioEnginePitchTest-master\PcmSample1\patchfield) $(call import-module,src\main\jni)

Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin

Here is how to solve this issue : add  gradle.properties  file to root folder of your project add  'android.useDeprecatedNdk=true'  to  gradle.properties  file Here is my gradle.properties : # Project-wide Gradle settings. # IDE (e.g. Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/do...

Top level gradle for ndk

// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle-experimental:0.4.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean( type : Delete) { delete rootProject.buildDir }