Do you think it’s possible to have the markers on the corner of a table to form a plane and maybe a central marker to spawn the model, so I can get a very solid tracking for an object on a table, even when the marker is not visible?
The damnedest thing, I can package a projet just fine to iOS but cannot it via the editor.
Launching gets stuck on either “Init webcam error” OR gets stuck on the splash screen.
Thoughts?
Did you find a solution for this? I’m having the exact same problem. The camera works when using target sdk 21 but does not work when using target sdk 26 to meet the Google Play Store requirements. I too have already made the path change from “/obb/” to /Android/obb/".
I have narrowed the problem down to the permission changes in Android SDK 23+. If I go into settings -> apps -> myapp -> permissions and enable both the camera and storage, then my app will load and the camera works. I tried to request android.permission.CAMERA and android.permission.READ_EXTERNAL_STORAGE at runtime using the Request Android Permission blueprint node before ARToolKit Component Init inside of the ARToolkitBaseAdvanced blueprint, I get a white screen until i restart the app at which point everything works correctly. I’m guessing I need to the permission request even earlier but I’m not sure where to put it or if it needs to be done somewhere in code.
Try to add new permissions to the ARToolkitPlugin_APL.xml located in:
SampleProject\Plugins\ARToolkitPlugin\Source\ARToolkitPlugin\ARToolkitPlugin_APL.xml
This was happening when launching from within the editor, publishing and deploying using the install script, and on the Google Play Store. I found a few posts talking about the storage issue and it sounds like that might only be related to certain phones which is what I am using to test.
The problem ended up being that Android requires you to request at run time the permissions to access the camera and storage when using SDK 23 or higher. The Google Play store requires a minimum target SDK of 26 so the app was never requesting permission since it has to be added in code and not just the manifest like it use to be prior to SDK 23.
I was on the right track but didn’t realize the blueprint node Request Android Permissions did the request asynchronously so the app wasn’t waiting for the user to make a choice before continuing initializing the plugin. That blueprint node returns a callback proxy object that allows you to bind an event. Calling the ARToolkit plugin’s Init function and setup in my bound event was then throwing an error saying the plugin code needed to run on the game thread.
I got it all working by using a boolean variable to determine if the user had given all of the proper permissions yet and then have it check on the tick event. Once a user gives permission the next to tick allows the plugin init code to run once and it’s in the correct thread so it works.
I need help please. I try to oppen my ARapp on my LgG4, but the app crash when i will open it. The msn is “error unfortunately [App] has stopped”. I test the proyect on my pc with webcam and its run good. I was testing too with UNREAL4AR app, and its run good. Its should be the same app right?
I’ve recently purchased this plugin, but have been unable to make it work on my android device (a Moto G5 Plus running Android 7.0) when installing through the .bat or Play Store.
The issue I am facing is that there is no camera feed - all I see is a blank background. When I from editor on my device, such problem does not occur and all works fine when using a webcam.
Here is what I already did, after researching the posts here:
I am requesting Camera and Storage permissions before calling the Init node in my blueprints;
I am not packaging everything inside a single .apk;
I already changed the obb path variable within the .xml, as explained in the Android Quick Start;
The output from adb logcat tells me:
09-27 11:45:26.992 16016 16035 E libar : Error (2): unable to open camera parameters file "/storage/emulated/0/Android/data/com.Test.AR/files/UE4Game/Unreal4AR/Unreal4AR/Content/ARToolkit/Data/camera_para.dat" for reading.
09-27 11:45:26.992 16016 16035 E libar : No such file or directory
Which apparently should have been fixed by changing the obb path in the .xml file
Also, this error seems to only happen the first time I open the app (I show an error message when Init returns false). After that, every time I execute the app, it seems to be working, despite no camera feed coming through and no target being recognized.
I think the path is not valid:
/storage/emulated/0/Android/data/com.Test.AR/files/UE4Game/**Unreal4AR/Unreal4AR/**Content/ARToolkit/Data/camera_para.dat" There is an extra Unreal4AR in it. Can you please check ?
I’ve sent an e-mail, but we can keep the discussion here for future reference to others, if you are okay with it.
I am not sure how to change this - from what I could gather of your plugin, this path is set in the file “ARTolkitDevice.cpp” and the problem seems to be at line 114, where “AbsoluteContentPath” is set
From the looks of it, you are getting the project name twice - is this the problem then?
=-=-=-=-=-=-=-=EDIT=-=-=-=-=-=-=-=
Upon further inspection, this path seems to be correct. When installed directly from Unreal (through the options), a “Unreal4AR” folder is created within the UE4Game folder (located in the root of my device) and all that path (including the Unreal4AR/Unreal4AR) is perfectly correct.
But when installing through the .bat OR PlayStore, such folder is not there. That’s why, when I install it through the Editor and later through any other means, the app works - because the folder is already there.
My guess then is that either I am setting things up incorrectly in the packaging process (most probable), or the plugin is missing something somehow.
But still, I followed every step, deactivated all checkbox that should (as far as I understood) be deactivated… so I am truly at a loss
Hi Developer , we are using your plugin to create some applications for android ,
and we are facing some issues with it , In Editor everything works fine but when we package it for android , we are not able to see any camera output , all we can see is a white screen (which we guess is the plane which is infront of the camera ) , We are working on a demo project from the official website and the plugin we are using is a commercial one .
Please help us
ThankYou .
Hello, I’m in the same situation that **blkhouse_vlucki. **The strange thing is when I create a project from the sample project, I have no problem, but when I do with a blank project and adding the plugin by hand, the ARToolkit folder is not copied.
I’m working with UE4.20. I just wonder why this difference !
Hi, in our company we are interested in buying your pluggin, the commercial version, testing the demo, it only allows us to go 2 meters from the camera, more than that and it will stop tracking the marker. Is there a way to get more distance from the camera? 4 meters it would be the ideal distance.
InputStream is;
ZipInputStream zis;
try
{
String filename;
String FileFullPath;
String filepath;
is = new FileInputStream(path +"/"+ zipname);
zis = new ZipInputStream(new BufferedInputStream(is));
ZipEntry ze;
byte] buffer = new byte[1024];
int count;
while ((ze = zis.getNextEntry()) != null)
{
filename = ze.getName();
FileFullPath = pathDest + filename;
filepath = (FileFullPath).substring(0,FileFullPath.lastIndexOf(File.separator));
Log.debug(" ############### filename: ############ " + filename);
//extract only artoolkit related stuff
if (filename.toLowerCase().contains("artoolkit"))
{
// Need to create directories if not exists, or
// it will generate an Exception...
File f = new File(filepath);
if(!f.exists())
{
Log.debug(" ############### Not Exist Folder ############ " + filepath);
f.mkdirs();
}
switch plugin UPL Code in
String zipname = obbName;
< In this code >
if (ze.isDirectory())