How get datetime build app android from NDK?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How get datetime build app android from NDK?

Gioan Doan

Current in java android , us get datetime build app :

 try {
        ApplicationInfo ai = getPackageManager().getApplicationInfo(
                getPackageName(), 0);
        ZipFile zf = new ZipFile(ai.sourceDir);
        ZipEntry ze = zf.getEntry("classes.dex");
        long time = ze.getTime();
        String s = SimpleDateFormat.getInstance().format(
                new java.util.Date(time));

        Toast.makeText(this, "Build :" + s, Toast.LENGTH_LONG).show();

    } catch (Exception e) {
    }

So, i want get Datetime build from NDK ?

Thanks all

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/sPhz-tAfDdwJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: How get datetime build app android from NDK?

David Turner
Your best option is to use JNI to perform the same sort of thing from native code.

On Sat, Jan 12, 2013 at 1:26 PM, Gioan Doan <[hidden email]> wrote:

Current in java android , us get datetime build app :

 try {
        ApplicationInfo ai = getPackageManager().getApplicationInfo(
                getPackageName(), 0);
        ZipFile zf = new ZipFile(ai.sourceDir);
        ZipEntry ze = zf.getEntry("classes.dex");
        long time = ze.getTime();
        String s = SimpleDateFormat.getInstance().format(
                new java.util.Date(time));

        Toast.makeText(this, "Build :" + s, Toast.LENGTH_LONG).show();

    } catch (Exception e) {
    }

So, i want get Datetime build from NDK ?

Thanks all

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/sPhz-tAfDdwJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.