Friday, September 13, 2019

Config Support Java in Android App

Config Support Java in Android App

1.https://mvnrepository.com/artifact/com.typesafe/config/1.2.1
 
2.See gradle part
// https://mvnrepository.com/artifact/com.typesafe/config
compile group: 'com.typesafe', name: 'config', version: '1.2.1'
 
Change this to for newer android studio
 
dependencies {    ...
    implementation 'com.typesafe:config:1.2.1'     
 
    implementation 'org.cfg4j:cfg4j-core:4.4.1' 
    ...
    } 
 
3. In Java File
 
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory; 
 
 
private final String strSamples = readAndroidConfig("sns_service.audio.samples_per_second");
 
public String readAndroidConfig(String key){

        /* Read Config File */
        System.setProperty("config.file","/data/data/com.visteon.sns.app/sns/android-sns.cfg");
        Config config = ConfigFactory.load();
        String ssample_rate = config.getString(key);
        return ssample_rate ;

} 
 
 

Monday, September 9, 2019

Docker Usage

Docker Usage



nvidia-docker run --gpus all -t -d --rm --security-opt seccomp=unconfined -e uid=$UID -e LOCAL_USER_ID=`id -u` -e proxy=$http_proxy -e no_proxy=git.visteon.com -v /media/antpc/hdd/:/mount/hdd --mount type=bind,source=/media/antpc/hdd/alok_ws,target=/alok_ws -w="/alok_ws" --name "alok_ws" alok_ws_tf

docker exec -it alok_ws bash

sudo systemctl daemon-reload
sudo systemctl restart docker

Featured Post

XDP - Getting Started with XDP (Linux)