GearVR application is not recognized

Hello.
I have a problem with GearVR application (fork of the FPS template, C++, 4.12.5).
My project and SDK’s settings:
https://drive.google.com/drive/folders/0B6VhapqQv3c4WFJCMEVxMnN2MUk

For example I have created another project, blueprint based template and it working well (GearVR was recognized). Settings are identical for both projects.

In the AndroidManifest.xml of the C++ project I do not see the line:

<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only" />

In the blueprint template project:

Android version is 4.4.2. (I need only startup warning about VR capabilities of the application on this device).

Hi v.s.,

Make sure you’ve set up the project correctly. I did a quick test with 4.12.5 C++ project and didn’t have any issues launching the first person template.

  • Make sure that you’ve got the OSIG file in your Engine\Build\Android\Java\assets
  • Set the Project Settings for Configure the AndroidManifest for Deployment to the GearVR
  • Set the MIn SDK and Target SDK Version to 19
  • Under the Android SDK section, make sure you have the correct NDK set
  • SDK API level should be set to matchndk
  • NDK API Level should be set to android-19

This is all I had to make it work on my end. Make sure you have the same settings.

The device I launched to was an Android Note4 using OS version 4.4.4.

-Tim

Hi
I have checked all settings multiple times (OSIG in Engine\Build\Android\Java\assets, SDK versions 19 both etc.). I have used Nvidia Tegra Android Development Pack. But I do not see specific line inside AndroidManifest.xml (com.samsung.android.vr.application.mode). The reason remains unknown.

I found only one case where this code is present. Is there a way to find out the cause of the error or why the line misses inside AndroidManifest.xml?

<if condition="bPackageForGearVR">
			<true>       
				<addElements tag="application">
					<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
				</addElements>
				<addPermission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
				<addFeature android:name="android.hardware.usb.host"/>
			</true>
		</if>

These are the current things I have installed with my SDK.

Looking back at your images, the Target SDK Version needs to be set to 19 as well.

104174-targets.png

It may also help if you post a not so jumbled version of your manifest file. Can you screenshot it from Notepad or attach it here. I’m still thinking something isn’t correctly installed on your machine from the SDK though.

Hi Tim. I came to the conclusion that the problem is limited to a single project. Other projects are going normally. I tried to put version = 19, but unsuccessfully.

AndroidManifest.xml
https://drive.google.com/file/d/0B6VhapqQv3c4Q1VXT2R0WHp0WUk/view?usp=sharing

AndroidManifest.xml (text):
https://drive.google.com/file/d/0B6VhapqQv3c4VDF1Z1oyYlVlMzQ/view?usp=sharing

That manifest is unreadable. It should look more like this:

link text

If it’s only this project, there is something that isn’t set right or may be something in the folder. Try deleting all the folders in your project with exception of the Content and .UProject file. If you’re using source code, keep the Source folder as well. Maybe this will get rid of any issue with this specific project.

Thanks for the updated one! It’s much easier to read, but I don’t see any real difference here that would explain this.

If the issue is only happening with this project but is not reproducible on another one I’m not sure really. You could try migrating the content folder from your current project to a new one where it packages fine and see if you still get the error.

I deleted all the folders in the project except Source, Content and Config but it does not solve the problem. Migrating content and source code is successful in other projects. But still I would like to see a clear notice an error or something that indicates the inability to build the package with Gear VR support.