How to make a quick start the android emulator
Very very quick start of Android Emulator from Eclipse.
If will closed Android Emulator all data will saved on disk.
If will reopen Android Emulator, configuration and data will read from disk.
[caption id="attachment_768" align="alignleft" width="300" caption="android-emulator-enable-quick-start"][/caption]
- Go to Eclipse s menu Window -> Android SDK and AVD Manager
- Select Virtual devices
- Select check box Snapshot: Enabled
- Press Edit AVD button.
If will closed Android Emulator all data will saved on disk.
If will reopen Android Emulator, configuration and data will read from disk.
[caption id="attachment_768" align="alignleft" width="300" caption="android-emulator-enable-quick-start"][/caption]
396LW NO topic_id
AD
Další témata ....(Topics)
First cteate big icon 512x512 px formtat .PGN in graphics editor as Photoshop, Gimp, Piant.NET and save image.
If you create new project via Eclipse and choice your 512x512 image for ic_launcher.
Eclipse will make all icons from this image for new application very well.
If you create new project via Eclipse and choice your 512x512 image for ic_launcher.
Eclipse will make all icons from this image for new application very well.
Drawable dr = getResources().getDrawable(R.drawable.algebra);
int h = dr.getIntrinsicHeight();
int w = dr.getIntrinsicWidth();
Bitmap ball = BitmapFactory.decodeResource(getResources(), R.drawable.algebra);
int _nWidth = ball.getWidth();
int _nHeight = ball.getHeight();
BufferedWriter, FileWriter, write, close MODE_APPEND Java and Android example
Write to file Android example
Write to file Java example
Write to file Android example
try {
String MYFILE = "my_file";
String strText = "My text";
// MODE_APPEND, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE
// create new file or rewrite existing
FileOutputStream fos = openFileOutput(MYFILE, getApplicationContext().MODE_PRIVATE);
// append to file
FileOutputStream fos = openFileOutput(MYFILE, getApplicationContext().MODE_APPEND);
fos.write(strText.getBytes());
fos.close();
} catch (IOException e) {
e.toString();
}
Write to file Java example
try {
// new file
BufferedWriter out = new BufferedWriter(
new FileWriter("outfilename"));
// append text
BufferedWriter out = new BufferedWriter(new FileWriter("outfilename", true));
out.write("some text");
out.close();
} catch (IOException e) {
e.toString();
}
Try this trick.
In AndroidManifest - activity tag write this code
App hold data of a views if will to rotation of device.
In AndroidManifest - activity tag write this code
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
App hold data of a views if will to rotation of device.
<activity
android:name=".Tests_Activity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
Put your sglite database to Android Eclipse project folder named Assets.
On device will copy database file to application folder as this example:
On device will copy database file to application folder as this example:
public void createDatabase(Context myContext) throws IOException {
String sPackName = myContext.getPackageName();
InputStream assetsDB = myContext.getAssets().open("myDatabase");
OutputStream dbOut = new FileOutputStream("/data/data/"+sPackName+"/database");
byte[] buffer = new byte[1024];
int length;
while ((length = assetsDB.read(buffer))>0){
dbOut.write(buffer, 0, length);
}
dbOut.flush();
dbOut.close();
assetsDB.close();
}
Editace: 2011-09-23 08:57:10
Počet článků v kategorii: 396
Url:how-to-make-a-quick-start-the-android-emulator