Monday, February 23, 2026

Android java: Work Manager and Alarm Manager

Java Android Scheduling: Work Manager and Alarm Manager

WorkManager: 

  • Constraints: You can specify conditions like "only run when charging" or "only on Wi-Fi".
  • Persistence: Tasks survive device reboots and app crashes.
  • Backward Compatibility: It automatically chooses the best underlying API (JobScheduler, AlarmManager, etc.) based on the device's API level.
  • Limitation: It does not guarantee exact timing. The system may delay execution to optimize battery life. 

AlarmManager

  • Precision: Can wake the device from Doze mode to trigger a notification exactly when scheduled.
  • Lifecycle Independent: Operates outside your app's lifecycle once set.
  • It is resource-intensive because it wakes the device.
  • It does not support execution constraints (like network requirements).
  • For long-running tasks triggered by an alarm, Google recommends handing off the work to WorkManager from the alarm's BroadcastReceiver.  
Feature  WorkManager AlarmManager
Timing Deferrable (inexact) Precise (exact)
Guaranteed? Yes, even after reboot Not inherently (must reset on reboot)
Constraints Battery, Network, Storage None (time-only)
Power Efficiency High (optimized by OS) Low (wakes device)
Minimum Interval 15 minutes for periodic work None (can be immediate)
Supported Version Known stable on Android 13+ All

 

 

 

Debian 13: debsecan to check vunerablities

This is MUST know for server admin.

Debin profide debsecan to analyzes the list of installed packages on the current host and reports vulnerabilities found on the system.

It runs locally and downloads vulnerability information over the Internet. It can send mail to interested parties when new vulnerabilities are discovered or when security updates become available. 

Installing debsecan

# apt install debsecan
Installing:                     
  debsecan

Using debsecan for linux-image (kernel)

# debsecan --suite trixie --only-fixed | grep -i linux-image 

If empty, don't have to upgrade linux-image 

e.g for 

CVE-2024-XXXXX linux-image-6.12.57+deb13-amd64 (high urgency)
CVE-2024-YYYYY linux-image-6.12.57+deb13-amd64 (medium urgency)

you MUST upgrade your linux-image, and plan for reboot system for kernel upgrade! 

 to list vulnerable software 

# debsecan --suite trixie --only-fixed --format packages
libavcodec59
libavfilter8
libavformat59
libavutil57
libpoppler126
libpostproc56
libssh-gcrypt-4
libswresample4
libswscale6
libvpx7
linux-headers-6.12.31-amd64
linux-headers-6.12.31-common
linux-headers-6.12.57+deb13-amd64
linux-headers-6.12.57+deb13-common
linux-kbuild-6.12.31
linux-kbuild-6.12.57+deb13

Note: they don't pose a runtime security risk to your system, but they are "out of date." . Consider to upgrade package.

Wednesday, February 18, 2026

Java Netbeans: java with maven vs java with gradle

Comparison

Feature  Java with Maven Java with Gradle
Configuration Uses XML (pom.xml). Uses Groovy or Kotlin DSL (build.gradle).
Philosophy Convention over configuration; strict, linear lifecycle. Flexibility; task-oriented and highly customizable.
Performance Slower; typically lacks advanced incremental build tracking. Faster; uses build caching, daemons, and incremental compilation.
Learning Curve Easy for beginners due to standardized structure. Steeper; requires understanding the DSL and build logic.
IDE Integration Deeply integrated; NetBeans was a pioneer in native Maven support. Fully supported; provides fast project synchronization.
Start with default template Yes No

 

 

When Java with Maven 

  1.     Onboarding & Stability: Because Maven follows strict convention-over-configuration, any Java developer can join a project and immediately know where everything is and how to run it.
  2.     Predictability: Maven’s XML is declarative and "logic-free," making it very reliable for CI/CD pipelines where "zero-surprise" builds are critical.
  3.     Low Maintenance: Maven projects from 10 years ago often still build perfectly today. Gradle’s high-speed evolution means its build scripts can sometimes require updates when you upgrade versions.
  4.     Small Projects: For a single-module project, the speed difference is negligible. In these cases, the extra complexity and learning curve of Gradle may not be worth it. 

When Java with Gradle

  1.     Large, Multi-Module Projects: Gradle is significantly faster (sometimes 100x faster) because it only recompiles what changed and can share build results between different developers via a Build Cache.
  2.     Custom Workflows: If you need to do something non-standard (like custom file manipulations or complex deployment steps), Gradle’s Groovy/Kotlin DSL is much more powerful than writing custom Maven plugins.
  3.     Android Development: Gradle is the official build tool for Android, making it the only real choice for that ecosystem.

This content is created from AI chat. 

Monday, February 16, 2026

Privacy Policy for Wreda Text Helper

 

Privacy Policy


Effective Date: 16 February 2026


Thank you for using Wreda Text Helper.


1. Overview


Wreda Text Helper is designed to assist users with text accessibility features. We respect your privacy and are committed to protecting it.


2. No Data Collection


Wreda Text Helper:


Does NOT collect any personal information


Does NOT collect usage data


Does NOT track users


Does NOT store any personal data



We do not collect names, emails, phone numbers, device identifiers, location data, or any other personal information.


3. No Internet Usage


This application:


Does NOT require an internet connection


Does NOT transmit any data to external servers


Works fully offline



All functionality runs locally on your device.


4. No Advertising


Wreda Text Helper:


Does NOT contain advertisements


Does NOT use AdMob or any third-party advertising services



5. No Data Sharing


Since we do not collect any data, we do not share, sell, rent, or distribute any user information to third parties.


6. Accessibility Service Usage


Wreda Text Helper uses Android Accessibility Service solely to provide its core functionality.


The service is used only to assist users with text-related features and does not collect, store, or transmit any user data.


7. Children’s Privacy


Wreda Text Helper does not knowingly collect any personal information from children or adults. The app is safe for general use.


8. Changes to This Privacy Policy


If this Privacy Policy is updated, changes will be reflected in the updated version of the app listing.


9. Contact


If you have any questions about this Privacy Policy, you may contact:


Developer: dedeetok

Email: dedetoke@gmail.com

 


 

Android java: local webview from local html e.g help page

Create directory and html files

Switch to Project View (not Android view)

  1. Go to: [your_project]
  2. app/src/main/
  3. Right click on main
  4. → New
  5. → Directory
  6. → select or type "assets"
  7. right click "assets" 
  8. → New
  9. → Directory
  10. → type "webhelp"
  11. right click "webhelp" 
  12. → New
  13. → File
  14. → type "htmlhelp.html"
  15. Repeat step 11 for your language e.g. id for Indonesia e.g. "htmlhelp_id.html" 

You can copy paste html code into htmlhelp.html" and "htmlhelp_id.html"

here is layout to show the webview

    ...
    <WebView
        android:id="@+id/my_web_help"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />
    ... 

here is code to show the webview

...
    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
...
        WebView webView = view.findViewById(R.id.my_web_help);

        // Safe defaults
        webView.getSettings().setJavaScriptEnabled(false);
        webView.getSettings().setAllowFileAccess(true);
        webView.getSettings().setDomStorageEnabled(false);

        loadHelpPage(webView);
...
    }

    /*
     * file html helper
     */
    private void loadHelpPage(WebView webView) {

        String lang = Locale.getDefault().getLanguage();
        String fileName;

        if ("id".equals(lang)) {
            fileName = "htmlhelp_id.html";
        } else {
            fileName = "htmlhelp.html";
        }

        webView.loadUrl("file:///android_asset/webhelp/" + fileName);
    }
... 

Optional configuration webview when your application got trouble when submit to application store e.g google play store

WebSettings settings = webView.getSettings();

settings.setJavaScriptEnabled(false);
settings.setDomStorageEnabled(false);
settings.setAllowFileAccess(true);          // needed for assets
settings.setAllowContentAccess(false);
settings.setAllowFileAccessFromFileURLs(false);
settings.setAllowUniversalAccessFromFileURLs(false);
settings.setSupportZoom(false);
settings.setBuiltInZoomControls(false);