npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

com.coopbank.mcoopcash50uninstallapp

v0.0.1

Published

App Migration Helper - Detect Old app , if installed prompt uninstall

Readme

Cordova Old App Detector Plugin

A Cordova plugin to detect if an old version of your app is installed on the device and prompt users to uninstall it. This is useful when migrating from an old app package to a new one.

Installation

cordova plugin add cordova-plugin-oldapp-detector

Or install from a local directory:

cordova plugin add /path/to/cordova-plugin-oldapp-detector

Supported Platforms

  • Android
  • iOS

Usage

Check if Old App is Installed

Check if a specific app (by package name) is installed on the device:

document.addEventListener('deviceready', function() {
    var oldPackageName = 'com.example.oldapp';
    
    cordova.plugins.OldAppDetector.isOldAppInstalled(
        oldPackageName,
        function(isInstalled) {
            if (isInstalled) {
                console.log('Old app is installed');
                // Show a custom message or prompt uninstall
            } else {
                console.log('Old app is not installed');
            }
        },
        function(error) {
            console.error('Error checking old app:', error);
        }
    );
});

Prompt User to Uninstall Old App

Display a native prompt asking the user to uninstall the old app:

document.addEventListener('deviceready', function() {
    var oldPackageName = 'com.example.oldapp';
    
    cordova.plugins.OldAppDetector.promptUninstall(
        oldPackageName,
        function(result) {
            console.log('Uninstall prompt shown successfully');
            // The user will be taken to the app settings or uninstall screen
        },
        function(error) {
            console.error('Error showing uninstall prompt:', error);
        }
    );
});

Complete Example

Here's a complete workflow for detecting and prompting uninstall:

document.addEventListener('deviceready', onDeviceReady, false);

function onDeviceReady() {
    checkForOldApp();
}

function checkForOldApp() {
    var oldPackageName = 'com.example.oldapp';
    
    // First, check if old app exists
    cordova.plugins.OldAppDetector.isOldAppInstalled(
        oldPackageName,
        function(isInstalled) {
            if (isInstalled) {
                // Show custom alert or dialog
                if (confirm('We detected an old version of this app. Would you like to uninstall it?')) {
                    promptUninstallOldApp(oldPackageName);
                }
            }
        },
        function(error) {
            console.error('Error:', error);
        }
    );
}

function promptUninstallOldApp(packageName) {
    cordova.plugins.OldAppDetector.promptUninstall(
        packageName,
        function(result) {
            console.log('User taken to uninstall screen');
        },
        function(error) {
            console.error('Could not open uninstall screen:', error);
        }
    );
}

API Reference

isOldAppInstalled(packageName, successCallback, errorCallback)

Checks if an app with the specified package name is installed.

Parameters:

  • packageName (string): The package name of the old app to check
    • Android example: 'com.example.oldapp'
    • iOS example: 'oldapp://' (URL scheme)
  • successCallback (function): Called with a boolean value
    • true if the app is installed
    • false if the app is not installed
  • errorCallback (function): Called if an error occurs

Example:

cordova.plugins.OldAppDetector.isOldAppInstalled(
    'com.example.oldapp',
    function(isInstalled) {
        console.log('Installed:', isInstalled);
    },
    function(error) {
        console.error('Error:', error);
    }
);

promptUninstall(packageName, successCallback, errorCallback)

Opens the native uninstall screen for the specified app.

Parameters:

  • packageName (string): The package name of the app to uninstall
    • Android example: 'com.example.oldapp'
    • iOS example: Opens app settings (iOS doesn't allow programmatic uninstall)
  • successCallback (function): Called when the uninstall screen is successfully opened
  • errorCallback (function): Called if an error occurs

Example:

cordova.plugins.OldAppDetector.promptUninstall(
    'com.example.oldapp',
    function(result) {
        console.log('Uninstall screen opened');
    },
    function(error) {
        console.error('Error:', error);
    }
);

Platform-Specific Notes

Android

  • Uses PackageManager to check if an app is installed
  • Opens the app details settings page where users can uninstall the app
  • Requires no special permissions

iOS

  • Uses URL schemes to detect if an app can be opened
  • You need to know the URL scheme of the old app (e.g., oldapp://)
  • On iOS, you cannot programmatically uninstall apps, so promptUninstall will open the app settings
  • You may need to add the URL scheme to your Info.plist under LSApplicationQueriesSchemes

Info.plist configuration for iOS:

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>oldapp</string>
</array>

Use Cases

  1. App Rebranding: When you've released a new app with a different package name
  2. Migration: Moving users from an old app to a completely new one
  3. Duplicate Prevention: Preventing users from having both old and new versions installed
  4. Clean Migration: Ensuring users uninstall deprecated apps

Common Issues

iOS: "canOpenURL: failed" error

If you see this error, make sure you've added the URL scheme to your Info.plist under LSApplicationQueriesSchemes.

Android: Permission denied

This plugin doesn't require special permissions, but make sure your app targets the correct API level.

Contributing

Contributions are welcome! Please submit pull requests or open issues on GitHub.

License

MIT License

Author

Harrison

Repository

https://github.com/yourusername/cordova-plugin-oldapp-detector

Support

For issues and questions, please open an issue on GitHub.