Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 986539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:20:07+00:00 2026-05-16T05:20:07+00:00

I need an Android application which should be able to fetch data from the

  • 0

I need an Android application which should be able to fetch data from the web (maybe an .apk or a .jar) and launch “something” from it.

If it’s a “trivial” class there’s no problem at all. This is my Loader

package com.m31.android.urlload;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.ClassLoader;
import java.net.URL;

import dalvik.system.PathClassLoader;
import dalvik.system.DexClassLoader;


public class Loader extends ClassLoader {
    public Loader() throws IOException {
        super(Loader.class.getClassLoader());
    }

    public Class loadClass(String className) throws ClassNotFoundException {
         return findClass(className);
    }

    private String fetch_package(String url) throws IOException {
        BufferedInputStream in = new BufferedInputStream(new URL(url).openStream());
        FileOutputStream fos = new FileOutputStream("/mnt/sdcard/_plugins/plugin1.jar");
        BufferedOutputStream bout = new BufferedOutputStream(fos,1024);
        byte data[] = new byte[1024];
        int count;
        while((count = in.read(data,0,1024)) > 0) {
            bout.write(data,0,count);
        }
        bout.close();
        in.close();
        return "/mnt/sdcard/_plugins/plugin1.jar";
    }

    public Class findMyClass(String className, String url) throws IOException, ClassNotFoundException {
        String path = fetch_package(url);
        DexClassLoader pcl = new DexClassLoader(path, "/mnt/sdcard/_dex/", null, this);
        return pcl.loadClass(className);


    }
}

The problem is that the code I want to execute looks very like an application, which should have a “simple” view and some interaction on it.

I’m not able to invoke the “onCreate” method of my downloaded class.

I guess I’ve three streets:

  1. I look for a method which silently install the application and then runs it (is it possible?);
  2. With your help, I understand how to initialize a second “application” inside my own one (with its own R and all stuff);
  3. I write my master program to fetch data from the web and construct pages dynamically.

So, I definitely need your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:20:08+00:00Added an answer on May 16, 2026 at 5:20 am

    I’m pretty sure you can’t silently install a new app. Also, I’ve been unable to find any way to register a new Activity into an existing application at runtime. I suppose you could write a WrapperActivity that passes all calls to another that you load dynamically, but that would still leave unsolved the problem of being able to load the resource data.

    In the end, you will probably need to either write your code to completely avoid using the Android resource system (possible but difficult), or just go with a WebView and HTML with JavaScript (harder to cache and less native-looking, but much simpler to implement) for the dynamic bits.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 503k
  • Answers 503k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Register on CodePlex Create a project on CodePlex Connect to… May 16, 2026 at 2:47 pm
  • Editorial Team
    Editorial Team added an answer I think the answer here is less about the particular… May 16, 2026 at 2:47 pm
  • Editorial Team
    Editorial Team added an answer This will not work in a lot of browsers actually… May 16, 2026 at 2:47 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am working on an Android application which is supposed to play videos over
I have an Android application that generates some HTML which is rendered locally, in
I´m writing an application for Android in which I have a character that I
I'm currently looking for a way to launch the default browser application on Android
In need in my application to fetch remote HTML document and parse some parts
I have a username as password which I need to send to a website
I want to get fling gesture detection working in my Android application. What I
I'm developing an application that will be available from a website (market probably as
I have an Android application (java) that was working fine when compiled with the
I've have an application with Android front end and Django as the back end.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.