Hi, please help with installing an .apk

by Dr. Tingrong Lu » Fri, 02 Jan 2009 19:19:29 GMT


Sponsored Links
 Hi,

I'm trying to write a code to install an apk on SDK1R2. I read your posts on 
google groups, and copied the code like below. but the code doesn't work. Did I 
miss anything? Thanks. 




 public void insAPK() {
    Uri data = Uri.parse("file://sdcard/an1115.apk");
    try {
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setDataAndType(data, "application/vnd.android.package-archive");
        startActivity(intent);
    } catch (Exception e) {
        Log.e("insAPK", e.getMessage());
    }
 }
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Android libraries

Managing an Android project in Eclipse, which I need to divide into
several libraries...

What, exactly, are the differences between "Android Libraries" (made
with Properties | Android | Library | Add) and "Referenced
libraries" (made with Properties | Java Build Path | Libraries | Add
JARs).

I've already experimented and found out that:
- Android Libraries cannot use other Android Libraries
- Referenced libraries integrate less smoothly, requiring extra effort
to build the .jar etc.
- Both seem to be slightly unstable, sometimes not building everything
and creating an ,apk that compiles correctly but is missing the
library classes. (I'm not yet sure exactly when this happens, but I've
seen it a few times -- usually fixed by closing and reopening the
projects).

But, I don't yet have a good picture of when I should be using which,
nor any overall documentation. Anyone know the full story on these two
kinds of library usages?

Thanks,
David

-- 

2. Eclipse Debugger On Device for Galaxy S Phones?

Very strange things are happening for me.  I just got a Samsung Epic4G
Galaxy S device and I can build applications in eclipse just fine, but
when I try to debug the de{*filter*} does not attach.  It just runs
normally.  It never stops at any breakpoints, and I can't figure out
whats wrong.

I installed the USB drivers and I am able to run the application on my
phone normally, but not debugging.  Anyone have any ideas?

The de{*filter*} WILL attach to the emulator...and when I start debugging
with both the emulator and my phone plugged in it gives me a dialog
that says this:
Serial Number | AVD Name| Target| Debug| State
D700xxxxxxx | N/A           |  2.1-update1|  <BLANK> | Online
emulator-5554 | Android21 | Android2.1-update1| Yes | Online

So it looks like the debug flag for my device is blank?

Yea not sure where to go from here, any help would be greatly
appreciated.

-- 

3. Lost my keystore, loads of Apps, what to do?

4. Android Tablets...

5. LOCK_PATTERN_ENABLED on API 8 (Froyo)

6. Android factory test mode

7. can an application have more than one icon in the launcher?