Take picture and save it to gallery and rename it

I’m beginner to cordova plugin
I’m saving image to gallery with this option

    var options = {
        quality: (device.platform == "iOS" ? 60 : 80),
        destinationType: Camera.DestinationType.FILE_URI,
        sourceType: Camera.PictureSourceType.CAMERA,
        encodingType: Camera.EncodingType.JPEG,      
        targetWidth: 800,
        targetHeight: 800,
        popoverOptions: CameraPopoverOptions,
        correctOrientation: true,
        saveToPhotoAlbum: true

in $cordovaCamera.getPicture plugin
this code is saving my picture in gallery. But i want to rename this picture.

I am following these links but this link is not saving image in gallery.

How to move captured image taken by Android phone to another folder using Phonegap


    window.resolveLocalFileSystemURI(imgData, resolveOnSuccess, resOnError);

        function resolveOnSuccess(entry) {
            var d = new Date();
            var n = d.getTime();
            //new file name
            var newFileName = "test" + ".jpg";
            var myFolderApp = "EasyPacking";

            window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSys) {
                //The folder is created if doesn't exist
                fileSys.root.getDirectory(myFolderApp, { create: true, exclusive: false },
                    function (directory) {
                        entry.moveTo(directory, newFileName, successMove, resOnError);

        //Callback function when the file has been moved successfully - inserting the complete path
        function successMove(entry) {
            //I do my insert with "entry.fullPath" as for the path

        function resOnError(error) {

Where i am going wrong or is it possible to rename and save image to gallery in both android and ios.

Source: New feed
Source Url Take picture and save it to gallery and rename it