Hello,
I know this subject has been discussed many times over & over in this forum
& others but I still didn't figure it out.
I have a platform that does not have the accelerometer hardware, sensors...
So the screen never rotate and stays in the original orientation
constently. I know I can rotate my applications but what I would like is
rotate the whole system when the user click on a button for example. That
way I won't have to manage the orientation in my applications & the
existing applications will be rotated correctly as well.
I have the the signatures (platform keys) of the build, so I can build a
system application with hidden API access right?
I tried to build my system apk & sign it with the platform key, I included
the rights in the AndroidManifest.xml:
<code>
<permission android:name="android.permission.SET_ORIENTATION"
android:label="@string/permlab_setOrientation"
android:description="@string/permdesc_setOrientation"
android:protectionLevel="signature" />
</code>
My Android.mk looks like this.
<code>
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := FrameSettings
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
</code>
And when I try those lines I have the exception "NoSuchMethodError".
<code>
IWindowManager windowManager =
IWindowManager.Stub.asInterface(ServiceManager.getService("window"));
windowService.setRotation(1, false,mFancyRotationAnimation);
</code>
Please help :)
Oli
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting