How to custom my own home screen?

by water » Fri, 13 Feb 2009 02:06:24 GMT


Sponsored Links
 Android phone has a default home screen,a clock in the middle,and four
icons in the bottom,
i want to change this layout,
May i develop a application,after i installed it,it replace the
default home screen?
Thanks~!

--~--~---------~--~----~------------~-------~--~----~



How to custom my own home screen?

by Scynasty » Fri, 13 Feb 2009 04:23:25 GMT


 add    <category android:name="android.intent.category.HOME" />  in
the intent-filter of the activity you want as the home screen. when
the home button is clicked it will ask which home screen you want to
run.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. DalvikVM could not find field after ProGuard Obfuscation

I've been trying obfuscate my application for the last 2 days.
I must add that I'm new to Java, Eclipse, Ant and Android as well.

Currently I've managed to build the correct build.xml file and run
ProGuard 4.4. However, every time I install my apk I get multiple
errors from the "dalvikvm" such as "Found field 'e' but sig is 'J' not
'B'" or ".. sig is 'Lc' not '[c'" (Which has something to do with
arrays and enums).

This is my current proguard configuration:
<target name="obfuscate" depends="compile">
                        <jar basedir="${out-classes}" destfile="temp.jar"/>
                        <java jar="C:\onefone\proguard4.4\lib\proguard.jar" 
fork="true"
failonerror="true">
                                        <jvmarg 
value="-Dmaximum.inlined.code.length=32"/>
                                        <arg value="-injars temp.jar"/>
                                        <arg value="-outjars optimized.jar"/>
                                        <arg value="-libraryjars 
${android-jar}"/>
                                        <arg value="-dontpreverify"/>
                                        <!-- <arg value="-dontoptimize"/> -->
                                        <arg 
value="-dontusemixedcaseclassnames"/>
                                        <arg value="-repackageclasses ''"/>
                                        <arg value="-printmapping 
mappings.txt"/>
                                        <arg value="-allowaccessmodification"/>
                                        <arg value="-overloadaggressively"/>
                                        <arg 
value="-useuniqueclassmembernames"/>
                                        <arg value="-dontshrink"/>
                                        <arg value="-keep public class * 
extends android.app.Activity"/>
                                        <arg value="-keep public class * 
extends android.app.Service"/>
                                        <arg value="-keep public class * extends
android.content.BroadcastReceiver"/>
                                        <arg value="-keep public class * extends
android.content.ContentProvider"/>
                                        <arg value="-keep public class * 
extends android.view.View"/
                                        <arg value="-keep interface * "/>
                                        <arg value="-keepclassmembernames class 
* { java.lang.Class class$
(java.lang.String); java.lang.Class class$(java.lang.String,
boolean); }"/>
                                        <arg value="-keepclassmembernames class
com.GCompany.GCompanyStart"/>
                                        <arg value="-keep enum * "/>
                                        <arg value="-microedition" />
                                        <arg value="-keepclassmembers public 
enum * "/>
                                        <arg value="-keepclassmembers enum * { 
public static **[] values
(); public static ** valueOf(java.lang.String); static **[] $VALUES;}
"/>
                                        <arg value="-optimizations 
!code/simplification/arithmetic"/>
                                        <arg value="-adaptresourcefilenames
**.properties,**.gif,**.jpg"/>
                                        <arg value="-adaptresourcefilecontents 
**.properties,META-INF/
MANIFEST.MF"/>
                                        <arg value="-optimizationpasses 1"/>
                                        <arg value="-printseeds seeds.txt"/>
                                        <arg value="-keepattributes
Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod"/
                                        <arg value="-verbose"/>
                        </java>
                        <delete file="temp.jar"/>
                        <delete dir="${out-classes}"/>
                        <mkdir dir="${out-classes}"/>
                        <unzip src="optimized.jar" dest="${out-classes}"/>
                        <delete file="optimized.jar"/>
        </target>

When I look at the mapping.txt file I see duplicate members changing
to the same name like:

com.GCompany.WiFiLocker -> ba:
    android.net.wifi.WifiManager wifiManager -> a
    android.net.wifi.WifiManager$WifiLock wifiLock -> a

I'm not sure if this is bad or not.

After installing my application I get these errors:
11-04 15:59:15.323: INFO/PackageManager(564): /data/app/vmdl68172.tmp
changed; unpacking
11-04 15:59:15.414: DEBUG/installd(543): DexInv: --- BEGIN '/data/app/
vmdl68172.tmp'
---11-04 15:59:16.445: WARN/dalvikvm(1444): Found field 'a', but sig
is 'Landroid/net/wifi/WifiManager$WifiLock;' not 'Landroid/net/wifi/
WifiManager;'
11-04 15:59:16.455: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:16.564: WARN/dalvikvm(1444): Found field 'a', but sig is
'Lcom/OF/GCompany/Logger/ILogger;' not '[I'
11-04 15:59:16.574: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:16.584: WARN/dalvikvm(1444): Found field 'a', but sig is
'Lcom/OF/GCompany/Logger/ILogger;' not 'S'
11-04 15:59:16.595: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:16.634: WARN/dalvikvm(1444): Found field 'a', but sig is
'B' not 'Lcom/OF/GCompany/Logger/ILogger;'
11-04 15:59:16.634: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:16.825: WARN/dalvikvm(1444): Found field 'e', but sig is
'Lcom/GCompany/CallState;' not 'Z'
11-04 15:59:16.835: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:16.854: WARN/dalvikvm(1444): Found field 'e', but sig is
'Lcom/GCompany/CallState;' not 'Z'
11-04 15:59:16.854: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:16.864: WARN/dalvikvm(1444): Found field 'a', but sig is
'J' not 'Lcom/OF/GCompany/TServiceId;'
11-04 15:59:16.874: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:16.884: WARN/dalvikvm(1444): Found field 'e', but sig is
'Lcom/GCompany/CallState;' not 'Z'
11-04 15:59:16.894: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:17.025: WARN/dalvikvm(1444): Found field 'a', but sig is
'Landroid/net/wifi/WifiManager$WifiLock;' not 'Landroid/net/wifi/
WifiManager;'
11-04 15:59:17.035: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:17.145: WARN/dalvikvm(1444): Found field 'a', but sig is
'Lcom/OF/GCompany/Logger/ILogger;' not 'Lcom/GCompany/comm/
CommHandler;'
11-04 15:59:17.154: DEBUG/dalvikvm(1444): DexOpt: couldn't find static
field
11-04 15:59:17.315: WARN/dalvikvm(1444): Found field 'e', but sig is
'Lcom/GCompany/CallState;' not 'Z'
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Also, when trying  to run the application I get one
11-04 16:17:25.074: WARN/dalvikvm(1448): Found field 'a', but sig is
'Landroid/net/wifi/WifiManager$WifiLock;' not 'Landroid/net/wifi/
WifiManager;'
And the application exit with:
11-04 16:17:25.134: ERROR/AndroidRuntime(1448): Uncaught handler:
thread main exiting due to uncaught exception
11-04 16:17:25.173: ERROR/AndroidRuntime(1448): java.lang.VerifyError:
com.GCompany.GCompanyStart
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
java.lang.Class.newInstanceImpl(Native Method)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
java.lang.Class.newInstance(Class.java:1472)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
android.app.Instrumentation.newActivity(Instrumentation.java:1097)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2186)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
android.os.Handler.dispatchMessage(Handler.java:99)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
android.os.Looper.loop(Looper.java:123)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
java.lang.reflect.Method.invokeNative(Native Method)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
java.lang.reflect.Method.invoke(Method.java:521)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
11-04 16:17:25.173: ERROR/AndroidRuntime(1448):     at
dalvik.system.NativeStart.main(Native Method)

When skipping the obfuscate target during the build I don't get these
errors.

Any help will be appreciated
Thank you
GDroid

-- 

2. Help Required: Invoke Email Client from another android application

Hi,

Have a application from which i need to invoke the email client
provided as the base apps with android 1.5

-Sandeep

-- 

3. gdata-api

4. How to get my name account ie: sa...@gmail.com

5. Obfuscation of Android project

6. How to Add new sensor support in Android sensor framework?

7. How to execute code before exiting application