How to run the .apk file directly from the emulator

Put your problem here if it does not fit any of the other categories.

How to run the .apk file directly from the emulator

Postby Jitendra Kumar » Fri Mar 28, 2008 10:32 am

Hi! This is Jitendra

I installed my application in the emulator using the command:

android tools>adb install myapp.apk

i wanna know how to run it directly from the emulator without any help from eclipse

Anyone Help................Plz
Jitendra Kumar
Developer
Developer
 
Posts: 49
Joined: Thu Mar 06, 2008 7:55 am
Location: Bangalore

Top

Postby Jesmiatka » Fri Mar 28, 2008 10:43 am

Hi,

start up your emulator directly from the SDK folder (<sdk directory>/tools/emulator.exe).
When the emulator is booted you should be able to have your application visible in the ALL list on the home screen. This is when your application is installed correctly on the emulator.
Jesmiatka
Senior Developer
Senior Developer
 
Posts: 164
Joined: Mon Feb 04, 2008 3:37 pm
Location: Netherlands

Postby Jitendra Kumar » Fri Mar 28, 2008 1:37 pm

Hi J
Wat prblm i m having is that i getting 8 icons of my package in emulator that represents diffrent activity .Can u tell me how to package them in one so that i can see only one executable icon of my app.
Jitendra Kumar
Developer
Developer
 
Posts: 49
Joined: Thu Mar 06, 2008 7:55 am
Location: Bangalore

Postby Jesmiatka » Fri Mar 28, 2008 1:43 pm

Hi,

did you gave all the activities the following intent filter or something?

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.             <intent-filter>
  2.  
  3.                 <action android:name="android.intent.action.MAIN" />
  4.  
  5.                 <category android:name="android.intent.category.LAUNCHER" />
  6.  
  7.             </intent-filter>
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


Only the intent that is fired at the start of your application should have these. The LAUNCHER adds the icon to the menu, so if you remove that from your AndroidManifest.xml it should be all right.
You might want to wipe the data on the emulator as well before you install your next APK, if you don't the icons will stay.
Jesmiatka
Senior Developer
Senior Developer
 
Posts: 164
Joined: Mon Feb 04, 2008 3:37 pm
Location: Netherlands

Postby Jitendra Kumar » Fri Mar 28, 2008 1:50 pm

Yea
still not solved..............
Jitendra Kumar
Developer
Developer
 
Posts: 49
Joined: Thu Mar 06, 2008 7:55 am
Location: Bangalore

Postby Jesmiatka » Fri Mar 28, 2008 1:53 pm

On what did you answer Yea then?

Did you remove all the LAUNCHERS from the Manifest except for the main activity?
Did you wipe the data of the emulator (and restarted it after that)?
Did you install you apk again?
Did you do the steps in this order?
Jesmiatka
Senior Developer
Senior Developer
 
Posts: 164
Joined: Mon Feb 04, 2008 3:37 pm
Location: Netherlands

Top

Postby Jitendra Kumar » Fri Mar 28, 2008 2:00 pm

i removed the intent filters, started with the help of eclipse but still geting icons
Jitendra Kumar
Developer
Developer
 
Posts: 49
Joined: Thu Mar 06, 2008 7:55 am
Location: Bangalore

Postby Jitendra Kumar » Fri Mar 28, 2008 2:01 pm

after running the application and logging out i m getting icons of activity that came in the application
Jitendra Kumar
Developer
Developer
 
Posts: 49
Joined: Thu Mar 06, 2008 7:55 am
Location: Bangalore

Postby Jitendra Kumar » Fri Mar 28, 2008 2:02 pm

here is my Android manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.GPSDemo">
<application android:icon="@drawable/icon">
<activity android:name=".GPSDemo" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".UserSplash" android:label="@string/app_name">

</activity>
<activity android:name=".AdminSplash" android:label="@string/app_name">
</activity>

<activity android:name=".AdminMap" android:label="@string/app_name">
</activity>

<activity android:name=".UserMap" android:label="@string/app_name">
</activity>
<activity android:name=".Stat" android:label="@string/app_name">
</activity>
<activity android:name=".User" android:label="@string/app_name">
</activity>
<activity android:name=".Building" android:label="@string/app_name">

</activity>
<activity android:name=".QR" android:label="@string/app_name">
</activity>
<activity android:name=".Setting" android:label="@string/app_name">

</activity>

<activity android:name=".Mode" android:label="@string/app_name">
</activity>
<activity android:name=".Buildedit" android:label="@string/app_name">
</activity>
<activity android:name=".builddelete" android:label="@string/app_name">
</activity>


</application>
</manifest>
Jitendra Kumar
Developer
Developer
 
Posts: 49
Joined: Thu Mar 06, 2008 7:55 am
Location: Bangalore

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 11 guests