My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
InstallingOTA  
InstallingOTA
Updated Feb 4, 2010 by shane.is...@gmail.com

For the current Android SDK android.permission.INSTALL_PACKAGE does not work for external apks. To get around this limitation, use the SlideME SDK Installer. This is an external process that receives Content URLs over a socket connection. It then fetches content from the received URL, saves it to the file-system and then installs it using adb. To run the process.

    java -jar android-sdk-installer-1.0-CE.jar

The service runs on 8090, so you will need that port clear. You can also use this service with your own clients. Merely have your Android client do something similar to the following. It will download and install the content at the specified URI.

    public void download(URI uri) throws IOException {
        if (uri == null) {
            throw new IllegalArgumentException("ExternalContentHandler.download:uri");
        }
        OutputStream os = null;
        try {
            Socket socket = new Socket("10.0.2.2", 8090);
            os = socket.getOutputStream();
            os.write(uri.toString().getBytes());
        } finally {
            if (os != null) {
                os.close();
            }
        }
    }

Sign in to add a comment
Powered by Google Project Hosting