About    ↑  

Name    ↑  

VioletNote

Copyright 2024, Yoshiaki Watanabe

Summary    ↑  

This is a notepad application having the encryption function. This treats plain text without decorations and saves it as a file. When changing setting, it displays the result of Markdown syntax. It can create and send the encrypted note including images.

Disclaimer    ↑  

This software is distributed with no guarantee. Even if damage/disadvantage relating to this software occurs, we do not take responsibility.

Libraries    ↑  

This software uses the following library distributed under Mozilla Public License 1.1 (https://www.mozilla.org/en-US/MPL/1.1/)

  • juniversalchardet (https://code.google.com/archive/p/juniversalchardet/).
  • This software uses the following library distributed under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0)

  • Apache Commons (https://commons.apache.org/).
  • Markwon (https://noties.io/Markwon/).
  • Zip4j (https://github.com/srikanth-lingala/zip4j).
  • This software uses the following library distributed under GNU General Public License v2.0 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)

  • APISENSE / rhino-android (https://github.com/APISENSE/rhino-android).
  • Privacy Policy    ↑  

    This software collects no personal data of users.

    This software uses services identifying the user. The service policies are described in the service sites (Google Play Services, AdMob).

    This software does not include special processing that needs permission request at runtime.


    Manual    ↑  

    Start and Stop    ↑  

    The application is started by touching the application icon. It is finished by touching the back key. At start, following main screen is displayed.

    Main Screen    ↑  

    This is the screen displayed at first. It displays the file list of the 'app-specific storage'. The list is blank just after the installation. Addition of a new file is performed by touching the icon in the lower right corner. When touching a file, the viewer is shown. When long-touching a file, the filer is shown. When touching [Shared Storage ⇒] at the screen top, the 'shared storage' is shown by using SAF (Storage Access Framework). (The SAF can be used without storage access priviledge, but provides the basic standard UI only). The icon is the sort function. The icon is the more menu.

    Menu in Main Screen
    SortSelect the display order of file list
    NewOpen a new file
    SettingsShow Settings
    FilerShow Filer
    Trash CanShow Trash Can
    HelpShow this Web page
    VersionShow the application version
    Remove AdsRemove the advertisement

    Data File    ↑  

    Data files are stored in the app-specific storage or the shared storage.

    The app-specific storage cannot access from outside and after uninstallration. If you want to access data files from other applications or after uninstallation, save data to the shared storage or export data files in Filer.

    The files in the shared storage can be accessed from outside and can be held after uninstallation. But filer functions (e.g., delete, copy, make folder,...) for the shared storage is not implemented in this application. Use other applications such as 'Files by Google'.

    Viewer    ↑  

    This screen is shown when a file is touched in the main screen. The text is un-editable in the viewer. The icon is the editor. The icon is the text search. When cipher text file is selected, the password input is requested. The password is not requested during the specified time after entered once.

    When the text is long-touched, a menu is shown. The menu items "Adjust Range", "Scripts", and "Transliterate" are added ("Transliterate" is from Android 10) at range selection.

    The item "Adjust Range" shows buttons for adjusting text selection range. The above row includes close button, information, button to go to carriage return, button to exchange the range edges, and mode toggle (Stretch/Move). The below row includes buttons of cursor movement.

    The item "Scripts" shows the dialog for script processing of the selected text. When selecting a script from the list, the processing result is shown in the "Result" field. The "Copy" button copys the result to the system clipboard. For more details, refer the section "About Script".

    The item "Transliterate" shows the dialog for transliterating characters in the text selection range. When selecting "Conversion Type" (e.g., "Katakana-Latin") from the list, conversion result is shown in the "Result" field. The "Copy" button copys the result to the system clipboard.

    Menu in Viewer
    EditorShow editor
    SearchExecute text search. Can be enabled the regular expression search and case sensitive search from

    Editor    ↑  

    This screen is shown when the icon is touched in the lower right corner of the main screen or when the icon is touched in the viewer. The text is editable in the editor. The icon is undo. The icon is redo. The icon is the more menu.

    If cipher text file is selected at saving a new file, password setting is requested. The password is not requested during the specified time after entered once. The password is independent for each file. If the password is lost, the file cannot be opened forever.

    When the text is long-touched, a menu is shown. The added menu items are similar to the Viewer, Though the "Paste" button is added to the "Transliterete" dialog.

    Menu in Editor
    UndoCancel the previous editor action
    Redo Cancel the previous undo action
    Search and ReplaceExecute text search and replace. Can be enabled the regular expression search and case sensitive search from
    Embed ImageEmbed the selected image (shown if the markup syntax is Markdown)
    Close without SaveClose the editor without the saving action. The modified text is discarded.
    Save and CloseSave the editing text and close the editor.
    SaveAs and CloseSave the editing text with a new name, and close the editor.
    Change Password and CloseChange password, save and close (displayed in cipher text).

    Filer    ↑  

    This screen is shown when long-touching a file, or when the [Filer] is selected from the more menu of the main screen. The icon is the sort function. The icon is the more menu. The filer can execute functions about files in the app-specific storage such as copy, delete, rename, share, make-folder, export, import, backup and restore. This [share] means the sending function. Also the text data sent from other application can be recieved by this application.

    This does not include filer functions for the shared storage. Use other application such as 'Files by Google'.

    Buttons in Filer
    CopyCopy selected files
    RenameRename a selected file
    DeleteDelete selected files. The deleted files are held in the trash can
    ShareSend selected files by using the Share function
    OthersShow other filer commands.
    - Create FolderCreate sub-folder under the displayed folder
    - ExportCopy files selected from the file list to the shared storage
    - ImportCopy files selected from the shared storage to the app-specific storage
    - BackupPut all files together and create an archive file in the shared storage
    - RestoreExpand the archive file to the app-specific storageF (warning: existing files are over-written)
    - Reload ScriptsReload sample scripts to the scripts folder ".scripts".
    Menu in Filer
    SortSelect the display order of file list
    Select AllCheck all files in the file list
    Deselect AllClear checking of all files in the file list

    Trash Can    ↑  

    This screen is shown when the [Trash Can] is selected from the more menu of the main screen. The list of deleted files in the app-specific storage is shown. The icon is the sort function. The icon is the more menu. Files in the trash are deleted automatically after a specified period. The deleted files can be put back to tne original folder by touching [Restore] button. The name of the trashed file is like [.trash1234567890_note.txt]. The number [1234567890] is the timestamp of deletion, and the following text [note.txt] is the original file name.

    Buttons in Trash Can
    RestoreRestore selected files to the original folder
    Delete ForeverDelete selected files completely
    Menu in Trash Can
    SortSelect the display order of the file list
    Select AllCheck all files in the file list
    Deselect AllClear checking of all files in the file list

    Settings    ↑  

    This screen is shown when the [Settings] is selected from the more menu of the main screen. This screen set various settings of this application. The icon is the more menu.

    Setting Items
    Default File TypeDefault file type when creating a new file.
    Password Re-request Time (Sec)Password is not requested in this period.
    Password at ReturnIf On, the password is re-requested when the application is returned from back-ground to fore-ground.
    Viewer Text SizeThe text display size in the viewer.
    Editor Text SizeThe text display size in the editor.
    Word Wrap in ViewerIf On, the overflowed text in the viewer is shown on the next line.
    Word Wrap in EditorIf On, the overflowed text in the editor is shown on the next line.
    Show File DetailsIf On, update-time and file-size ara shown in the file list.
    Trash Retention Period (Days)The trash is deleted automatically after this period.
    Color ThemeThe screen color. In [System Default], it depends on the Dark/Light mode setting of the system.
    Markup SyntaxMarkup syntax interpreted in the viewer. Default is None.
    Embedded Image SizeWhen embedding an image, it is shrunk to fit the height and the width in this size.
    IMG Tag Options at Embedding ImageIMG tag option string used at embedding an image.
    CharSet of .txtThe CharSet of [.txt] file. Default is UTF-8.
    Is Detect CharSet of .txtIf On, detect the CharSet automatically at reading [.txt] file (at writing, above CharSet is used).
    CharSet of .chiThe CharSet of [.chi] file. Default is UTF-8
    Is Detect CharSet of .chiIf On, detect the CharSet automatically at reading [.chi] file (at writing, above CharSet is used).
    Show Scripts FolderIf On, show the folder of Script files ".scripts" in the Filer.

    Menu in Settings
    Reset SettingsReset application settings to initial values.

    About Encryption    ↑  

    Following is the Java source code to encrypt and decrypt [.vlnt] file.

                public String encrypt(String key, byte[] source) throws Exception {
                    String iv = RandomStringUtils.randomAlphanumeric(16);  // Initial_value
                    byte[] keyDigest = MessageDigest.getInstance("MD5").digest(key.getBytes());
                    SecretKeySpec sksSpec = new SecretKeySpec(keyDigest, "AES");
                    IvParameterSpec ivSpec = new IvParameterSpec(iv.getBytes());
                    javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance("AES/CBC/PKCS7Padding");
                    cipher.init(javax.crypto.Cipher.ENCRYPT_MODE, sksSpec, ivSpec);
                    String encodedStr = new String(Base64.encodeBase64(cipher.doFinal(source)));
                    // return Encode_version(4btyes) + Initial_value(16bytes) + Base64_encoded_str
                    return "VN01" + iv + encodedStr;
                }
        
                public String decrypt(String key, byte[] source) throws Exception {
                    // source : Encode_version(4bytes) + Initial_value(16bytes) + Base64_encoded_content
                    String version = new String(source, 0, 4);
                    if(!version.equals("VN01")) {
                        throw new UnsupportedEncodingException("Unsupported VioletNote encoding.");
                    }
                    byte[] iv = Arrays.copyOfRange(source, 4, 20); // Initial_value
                    byte[] content = Arrays.copyOfRange(source, 20, source.length);
                    byte[] keyDigest = MessageDigest.getInstance("MD5").digest(key.getBytes());
                    SecretKeySpec sksSpec = new SecretKeySpec(keyDigest, "AES");
                    IvParameterSpec ivSpec = new IvParameterSpec(iv);
                    javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance("AES/CBC/PKCS7Padding");
                    cipher.init(javax.crypto.Cipher.DECRYPT_MODE, sksSpec, ivSpec);
                    return new String(cipher.doFinal((Base64.decodeBase64(content))));
                }
              

    The [.vlnt] file performs Base64 encoding after AES encryption. Thus it includes printable 64 characters only. When the file is not modified and the extension is only changed from [.vlnt] to [.txt], the encoded text can be treated in many applications.

    By using Android application [Clipboard From/To](Ver.1.17.5 or later), the clear text can be obtained by the following process.

    1. Change the file extention from [.vlnt] to [.txt] by some filer application.
    2. Start [Clipboard From/To] and read the encrypted text by using [From File].
    3. Perform decryption by using [To Decrypt AES].
    4. Caution: the restored text is left in the history list and the clipboard. In the case of the secret note, please clear it carefully.

    For [.chi] file, please search Web sites describing about Tombo/Kumagusu.

    About Text Decorations and Images    ↑  

    In default, this application treats the plain text without decorations. If you need eye-catching markers, use the Emoji.

    If more various text expressions are necessary, select Markdown or HTML in [Menu > Settings > Markup Syntax]. The viewer displays the result of the syntax interpretation. For the implementation of Markdown syntax, the library Markwon (includes core, ext-tables, ext-strikethrough, ext-tasklist, image and html) is used. For the implementation of HTML syntax, Html.fromHtml in Android API is used. Please refer to the each site for details.

    The image is described as the URL-link or MIME-embedding, and it can be displayed in the Markdown mode only. Coloring of the text and back-ground can be displayed in the HTML mode only.

    For MIME-embedding, the item [Embed Image] is added to the option menu of the editor, when Markdown mode is selected. The item [Embed Image] inserts following string to the cursor position.

    <img alt="?" width="25%" src="__embN__"/>
    Do not modify the string [src="__embN__"]. The editor creates MIME-images at the start and holds them in the application memory with the key [__embN__] (cleared at the end). The number N is the serial number in the note. But [alt="?" width="25%"] can be modified freely (Default string exists as a settings item). For example, if you change 25% to 100%, the image is shown in the full screen width.

    The URL-link image is described directly as follows.

    ![sample](https://foo.bar.com/xxx.jpg)
    or
    <img alt="sample" width="25%" src="https://foo.bar.com/xxx.jpg">

    When touching a image in the viewer, the image viewer is started. It supports zooming image and saving image.

    About Regular Expression Search    ↑  

    This application can be switched to the regular expression search from the option in the search bar. In the regular expression search, longest match is executed (Eg., when the search text is "a.*c" and the content text "bcabcabcab", the search matchs to "abcabc"). And groups can be described in the replace string (Eg., when the search text is "a(.)(.)b" and the replace text is "p$2$1q", the content text "axyb" is replaced to "pyxq"). The help screen does not support the regular expression search.

    The regular expression search is implemented by using Pattern/Matcher of java.util.regex package. Please use the regular expressions interpretable by the package.

    About Script    ↑  

    Scripts are described with JavaScript, and stored in the ".script" folder of the application specific storage. To view the script folder, enable "Show Scripts Folder" in the Settings.

    The script is selected form the menu shown by long-touching the text. At start up, the selected text is set to the JavaScript variable "selectedText". At the end, the value of the JavaScript variable "resultText" is set to the "Result" field of the dialog. For example, the following script gets the text converted to uppercase of the selected text.

    resultText = selectedText.toUpperCase();

    The script is available only for the text processing. No device control function exists. The Rhino is used for JavaScript processing.

    Support    ↑  

    Please send questions and bug reports to the following mail address.
     watanaby00@yahoo.co.jp

    Following web page has been prepared. It includes this HELP. Use it for browsing in PC.
     https://violetnote-5ff6d.web.app/en/

    ChangeLog    ↑  

  • 2024/01/16 Version 1.0.0 This is the first release.
  • 2024/02/22 Version 1.0.1 Fixed plural bugs.
  • 2024/03/19 Version 1.0.2 Fixed a bug about the password retention time. Changed the password entry UI.
  • 2024/05/15 Version 1.1.0 Added the regular expression search and case sensitive search. Added all at once replacement and one by one replacement. Modified the procedure at the password timeout.
  • 2024/05/18 Version 1.1.1 Updated support libraries.
  • 2024/07/26 Version 1.2.0 Added load and save functions for data files in the shared storage. Updated support libraries. Made small modifications.
  • 2024/09/19 Version 1.3.0 Items 'Adjust Range', 'Script', and 'Transliterate' are added to the text long-touch menu.
  • 2025/02/08 Version 1.4.0 Enabled to show linked and embedded images in viewer, when the markup syntax is 'Markdown'. Added 'embed image' in the editor menu. Added Image Viewer having functions of zooming and saving image.
  • 2025/05/15 Version 1.4.1 Added inset to modify edge-to-edge display. Moved Filer menu items.