Properties in Android (6 posts)

  • Profile picture of rocky rocky1p said 3 months, 3 weeks ago:

    Excuse me , I have some question that I doubt.

    I want to append my properties file ( like my Application Config file ) which can load and save via my application.

    In the Pc version I put that properties in to my Application via modifying bulid.xml file
    and access them by specify their path ,something like this

        <target name="-post-compile">
            <copydir src="./resources" dest="${build.dir}/resources" />
        </target>
        <target name="-post-jar">
            <copydir src="./resources" dest="./dist/resources" />
        </target>
    
    Properties.load( new FileInputStream(/resources/my.properties));
    

    However , how can I do that in android ?? Is it the same as PC version that can accomplish by modifying some build.xml somewhere ?

    Thanks in Advance :)

  • Profile picture of nehon nehon590p said 3 months, 3 weeks ago:

    In the mobile project you have a mobile-build-impl.xml (or something like that) in the .nbproject folder

  • Profile picture of rocky rocky1p said 3 months, 3 weeks ago:

    Thanks :)

  • Profile picture of normen normen1271p said 3 months, 3 weeks ago:

    Do not change that file, it will be overwritten. Copy the targets from that file and paste them to the main build.xml

  • Profile picture of rocky rocky1p said 3 months, 3 weeks ago:

    Thanks again normen :)

  • Profile picture of normen normen1271p said 3 months, 3 weeks ago:

    np, note you only need to copy those targets you wish to change