Closed ethernyEonian closed 8 years ago
Starting activity from another. This work in the gvrtextviewsample, i tried to start activity from anthoer and it's works but not from clojure code.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.leindroid.sample"
android:versionCode="{{version-code}}"
android:versionName="{{version-name}}" >
<uses-sdk android:minSdkVersion="15"
android:targetSdkVersion="{{target-version}}" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:theme="@style/AppTheme"
android:icon="@drawable/gearvr_logo"
android:label="Android-Clojure">
<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
<activity android:name=".SplashActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:screenOrientation="landscape"
android:label="@string/app_name" >
<intent-filter>
<action android:name='test.leindroid.sample.MAIN'/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
I campared your gvrtextviewsample APK containt with the clojure APK, it looks good.
Hi there. I am not familiar with Clojure so it will take me couple of days to get up and running and study the problems. In the meantime you could send me a sample clojure project that exhibits the described problems - it may turn out faster.
Hi thank you for your interest ! You need to do some things to be able to compile the project. You need first add maven local dependencies :
This will put the three needed jars in .m2 local repo :
mvn install:install-file -Dfile=VrAppFramework.jar -DartifactId=VrAppFramework -Dversion=0.0.1 -DgroupId=oculus -Dpackaging=jar
mvn install:install-file -Dfile=VrApi.jar -DartifactId=VrApi -Dversion=0.0.1 -DgroupId=oculus -Dpackaging=jar
mvn install:install-file -Dfile=framework.jar -DartifactId=gearvrf -Dversion=0.0.2 -DgroupId=gearvrf -Dpackaging=jar
Install leiningen : Download from https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein Install in you /use/bin (or in your .bachrc) You can unzip and go to the project folder and run lein with lein droid do all This command will compile, package and push the APK to the connected device. If you pass the launch step, you can add your device id in Assets folder under root.
You can debug with adb logcat command.
You need to comment in GVRActivity.java in your framework.jar. It loaded from the first activity in clojure project. Because of reflexion error in AOT compilation.
static {
System.loadLibrary("gvrf");
}
Oculus for some reason refers to a resource id of 0x00000000. Given that this comes out of Oculus code we don't have the sources for, it could be tricky.
10-13 17:03:23.299 9448 9977 I VrApi : vrapi_EnterVrMode: defaulting to docked due to lack of dock events 10-13 17:03:23.299 9448 9977 I VrApi : vrapi_EnterVrMode: defaulting to mounted due to lack of mount events 10-13 17:03:23.299 9448 9977 W ResourceType: No package identifier when getting value for resource number 0x00000000 10-13 17:03:23.339 9448 9977 F art : sart/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: JNI GetStringUTFChars called with pending exception 'android.content.res.Resources$NotFoundException' thrown in unknown throw location
Why not launch the SampleActivity directly? For the sake of the test, what happens if you don't use the intermediate SplashActivity?
Tried to launch SampleActivity directly and i have the same issue. I think it's perhaps the loading circle asset. But i don't know why i can not access to this asset.
In your AndroidManifest.template.xml change the label to "android:label="@string/app_name"". Apparently there is a bug in Oculus if the label is not a resource id. This should get you past the resource-not-found exception. Afterwards I see some class-not-found exceptions but you can tackle these I hope.
Hi thank you for your answer the next Class not found is about the splashscreen texture loading on GVRScript class. When i look in the res (@root source) folder of the gvrtextviewsample project i don't find any trace of this default_splash_screen as needed at getSplashTexture of GVRScript class. But if i open the apk (bin) build by eclipse (with your instructions) i found the default_splash_screen file in the drawable-xhdpi-v4 res folder. Do you have a super apk aggregator for the common part of all your projects at build step ? I tried to add the default_splash_screen file in my res folder, but i have the same error, because, i think, about of a new generated ID for this resource, or you already have a R.java in your framework.
thank you by advance, for your help,.... again.....
S.
Hi there. Nothing fancy like "super apk aggregators"; in the case you describe the image is picked from the Framework (GVRF) project.
Not really a fix but you could just turn off the splash screen by adding this to your SampleViewManager:
@Override
public SplashMode getSplashMode() {
return SplashMode.NONE;
}
Or implement your own "public GVRTexture getSplashTexture(GVRContext gvrContext)" method that uses whatever splash you want. HTH.
Hi. Did this help? Are you unblocked? Can we consider this issue closed? Thanks.
Yes you can consider it closed, i have a black screen now. but it's another issue. Thank you for your help.
On Thu, Oct 29, 2015 at 12:09 PM, Mihail notifications@github.com wrote:
Hi. Did this help? Are you unblocked? Can we consider this issue closed? Thanks.
— Reply to this email directly or view it on GitHub https://github.com/Samsung/GearVRf/issues/272#issuecomment-152228621.
Hi, i m working to use your SDK under clojure but i have an error at resource loading at application start. When the application start i receive an resource Exception : App start, and crash just before oculus loading ring.
It's looks like the loading ring resource not found. But i don't have the resource name.