A collection of simple setup techniques in Android development _android

Source: Internet
Author: User
Tags locale

This example summarizes the simple setup techniques in Android development. Share to everyone for your reference, specific as follows:

1 Boot Picture:

Android-logo-mask.png
Android-logo-shine.png

These two pictures one in the previous next

./out/target/common/obj/java_libraries/android_stubs_current_intermediates/classes/assets/images/ Android-logo-shine.png
./frameworks/base/core/res/assets/images/android-logo-shine.png

Note: If the source code is not made, you can change the image directly in the frameworks.

Then direct make must be changed completely and cannot make only make Firmwar

2 The default boot wallpaper location:

Default_wallpaper.jpg

./out/target/common/obj/java_libraries/android_stubs_current_intermediates/classes/res/drawable/default_ Wallpaper.jpg
./frameworks/base/core/res/res/drawable/default_wallpaper.jpg

Note: This setting is the same as above and neither of them can change the filename

3 Change PC Machine Delete hardware text kernel

Drivers/usb/gadget/f_mass_storage.c

Fsg->vendor = "Xxxxxxxxxxxxx";

4 Change the volume label:

Bootable/recovery/etc/init.rc
SetProp Uservolumelabel "Xxxxxxxxxxxxx"

Package directly

5 Modify the Screen lock:

(1)

Frameworks/base/packages/settingsprovider/res/values/defaults.xml

<integer name= "Def_screen_off_timeout" >60000</integer>

60000 change to the desired time if it is not locked to-1

(2)

Frameworks/policies/base/phone/com/android/internal/policy/impl/keyguardviewmediator.java

Private Boolean mexternallyenabled = true;

Modify it to False

This change will no longer go into hibernation.

6 Initialization language:

Out\target\product\sdkdemo\root\default.prop
Rkdroid2.1\recovery\default.prop
Ro.product.locale.language = Es_es
Ro.product.locale.region = Es_es

Cannot make direct packaging

7 Set Initialization homepage:

Package/app/browser/res/values/string.xml

655 lines

The back is supposed to be in the bookmark.

8 Set Brightness 0~255:

Frameworks/base/packages/settingsprovider/res/values/defaults.xml

Def_screen_brightness--> This value is initialized like more than 100

9 Volume:

Frameworks/base/media/java/android/media/audiomanager.java
Array Default_stream_volume 4th value (Max I set to 30 but still 2 to the max-default is 11

It is recommended that all values in the array be set to the maximum OK.

MM Frameworks/base

10 Set up Google account , the upper left corner prompts "is setting RK2818SDK", the request is changed to "Setting W9":

13th line of Default.prop file in Out\target\product\sdkdemo\root

RO.PRODUCT.MODEL=RK2818SDK changed to Ro.product.model=w9

11 recordings are not shown in hours. Increased requirements:

Packages\apps\soundrecorder\src\com\android\soundrecorder
(1) Soundrecorder.java: private void Updatetimerview ()
Put

Copy Code code as follows:
String timestr = String.Format (Mtimerformat, TIME/60, time%60);

To

Long hour=time/3600;
String timestr = String.Format (Mtimerformat, Hour, (time-hour*3600)/60, time%60);

(2) in \res\values, Strings.xml should read:

<string name= "Timer_format" >
<xliff:g id= "format" >%02d:%02d:%02d</xliff:g>
</string >

12 Remove Bluetooth:

(Main interface-> Add Folder->bluetooth received)

Ic_launcher_folder_bluetooth.png (72*72):

In \packages\apps\bluetooth\res\drawable-hdpi
Workaround: Delete the bluetooth.apk under \out\target\product\sdkdemo\system\app

13 Charge lock Screen when the picture:

Frameworks\base\core\res\res\drawable-hdpi:ic_lock_idle_charging.png

14 Display the charge percentage when removing the lock screen:

FRAMEWORKS\BASE\CORE\RES\RES\VALUES-ZH-RCN the contents and parentheses of the strings.xml in the lockscreen_plugged_in bracket!!

15 Remove the Dynamic desktop background option:

Packages\wallpapers\basic Androidmanifest.xml <service> These, such as galaxies, are commented out as follows:

<service
  android:label= "@string/wallpaper_galaxy"
  android:name= " Com.android.wallpaper.galaxy.GalaxyWallpaper "
  android:permission=" Android.permission.BIND_WALLPAPER ">
  <intent-filter>
    <action android:name= "Android.service.wallpaper.WallpaperService"/>
  </intent-filter>
  <meta-data android:name= "Android.service.wallpaper" android:resource= "@xml/galaxy" />
</srvice>

16 Change version Number:

Build/core/makefile

79 lines

Rk_ver: = xxx

17 changing the layout of the interface

Location: Package/app/launcher2/res/xml/default_workspace.xml

Note: When you click on an arbitrary apk in the ADB shell, it will output in the background

I/activitymanager (728): Starting activity:intent {Act=android.intent.action.main cat=[ Android.intent.category.LAUNCHER] flg=0x10200000 Cmp=com.estrongs.android.pop/.view. Fileexploreractivity bnds=[294,373][393,478]}
I/windowmanager (728): Setting rotation to 1, animflags=0

Look at the blue part to find/front is the name of the package/back is the class name--> this is needed in default_workspace.xml.

Launcher:packagename= "Com.android.browser"       
launcher:classname= "com.android.browser.BrowserActivity"

18 How to put a PDF class file on the desktop

Customer requests that their own PDF help document be placed on the desktop so that guests can click to browse

String urlstring = "/SYSTEM/APP/NVSBL p4dv2 中文版 manual.pdf";
Intent Intent = new Intent ();
Intent.setaction (Android.content.Intent.ACTION_VIEW);
Intent.setdataandtype (Uri.fromfile (New File (urlstring)), "Application/pdf");
StartActivity (intent);
Finish ();

Explained below:

First put the PDF document under Out/target/product/sdkdemo/system/app

Give the fixed address to the urlstring, use the intent

Intent.setaction (Android.content.Intent.ACTION_VIEW);

Start view

Intent.setdataandtype (Uri.fromfile (New File (urlstring)), "application/pdf");

Application/pdf can specify other formats including audio, video, pictures, etc. but not tried.

Note: This method is not very good if you just place a few pictures, but if you put the files in a larger size, then package them.

System.img files can be very large, which is to occupy the system memory-----> so it is not recommended to use!!!!!!!!!!!

For more information on Android-related content readers can view the site topics: "Android Database Operating skills summary", "Android programming activity Operation Skills Summary", "Android File Operation skills Summary", " Android programming development of the SD card operation method Summary, "Android Development introduction and Advanced Course", "Android Resource Operation skills Summary", "Android View tips Summary" and "Android Control usage Summary"

I hope this article will help you with the Android program.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.