Sceneform Dependencies for 1.16.0 (Not AndroidX Compatible) - augmented-reality

Hi all to those who are using Sceneform 1.16.0, there were several issues that I found disturbing. Do give me some advice if you know how to fix these issues.
After the Sceneform 1.15.0 plugin broke on newer Android Studio platform >3.6+, I made the shift to 1.16.0 on the advice of the github sceneform-sdk page. After installing the Sceneform sdk 1.16.0, I faced several major issues.
The sdk is not androidx compatible. Even though I changed the annotations to androidx manually: import androidx.annotation.Nullable; import androidx.annotation.RequiresApi;, some things just broke --> My ViewRenderables code cracks even though it is the typical sample codes taken from the github page. This is the code sample that is vaguely similar to my current code.
Node tigerTitleNode = new Node();
tigerTitleNode.setParent(model);
tigerTitleNode.setEnabled(false);
tigerTitleNode.setLocalPosition(new Vector3(0.0f, 1.0f, 0.0f));
ViewRenderable.builder()
.setView(this, R.layout.fragment_stage_data)
.build()
.thenAccept(
(renderable) -> {
tigerTitleNode.setRenderable(renderable);
tigerTitleNode.setEnabled(true);
})
.exceptionally(
(throwable) -> {
throw new AssertionError("Could not load card view.", throwable);
}
);
});
If I choose to use the old support packages implementation "com.android.support:appcompat-v7:28.0.0" as suggested on the github sample page, it is also a problem, for example, if I intend to use the newer support library packages in androidx, I would have difficulties managing code conflicts or bugs.
The state of Sceneform SDK libraries. From reddit chats, some people have suggested the shift to other rendering engines like Filament or other 3rd party game engines like Unity. I understand the difficulties of building the Sceneform libraries and managing them, but the sudden "deprecation" of this project is a problem to people who wish to do native programming for AR.
I find that it was also a disappointment that the 'newest' sample codes from 3 months ago (est. June 2020) were still using the old support libs when the some of the more fast-paced Google teams are already building on top androidx capabilities. (Sorry to fredsa, tpsiaki who has been so hard at work trying to help update the library from Filament engine 1.7.0, but I would like to see some codes written in androidx for reference).
Right now I hope to find somebody to actually give some suggestions to my current project:
Migrate the project to Filament/Unity
Downgrade my codes back to 1.15.0 and redo my project
Wait for somebody to fix the bug or I go fix the bug (which I don't know how to)
Btw, I also have a question on 1.17.1 and how different it is from 1.16.0, and why it is similar to 1.15.0
This is my code error and do assist if my project can be saved.
2020-09-01 11:46:43.335 3542-3571/? E/WindowManager: RemoteException occurs on reporting focusChanged, w=Window{41c8196 u0 com.sutd.swatapp/com.sutd.swatapp.mainactivity.MainActivity EXITING}
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:1145)
at android.view.IWindow$Stub$Proxy.windowFocusChanged(IWindow.java:500)
at com.android.server.wm.WindowState.reportFocusChangedSerialized(WindowState.java:3981)
at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:5539)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:65)
at com.android.server.ServiceThread.run(ServiceThread.java:44)

let me answer your question even if it is already a year old. It is true that the last released version of the original Sceneform SDK is not compatible with AndroidX. You can change this quite easily by yourself, but there are better options out there.
ARCore SDK for Android: Scratch Sceneform and work directly with ARCore, but that would require you to work with OpenGL.
Google ARCore SDK for Unity: If you know about Unity
Sceneform Maintained Android SDK: Based on Sceneform with latest compatibly and functionalities from Android (including androidx**), ARCore and Filament. Currently a small community is working on it to keep it up to date and to develop new features.
If you want to know more about the community maintained version of Sceneform check out this Medium Article

Related

Using full Dart SDK with Flutter

Is there any way to tell Flutter use more newer dart sdk version? I found it a bit tricky, because it checks some hashes in flutter/bin/cache/*.stamp. And when I'm trying to make a symbolic link to homebrew installed dart sdk it cannot build flutter_tool. To do that I've removed flutter_tool.stamp and flutter_tool.snapshot files. Something else needed?
I'm not actually sure if it is a need or not, but these tools are still in beta, for me it sounds logic to use edge versions.
Flutter ships with a customized Dart SDK (for example with the web parts stripped).
The Flutter SDK is tightly bound to a specific Dart SDK version and there is no reliable way to make Flutter work with any other Dart SDK than the one it is installed with.

Android: Removing OpenCV older version will resolve Libpng Vulnerability warning?

I got an email from Google play store regarding - "Google Play warning: You are using a vulnerable version of libpng".
Email contains the below information -
https://support.google.com/faqs/answer/7011127
I didn't use libpng library in my application anywhere. But, In my android application, I am using the OpenCV2.4.5 library. After searching in the internet, I came to know that the OpenCV library uses the libpng.
My question - The upgrading of OpenCV2.4.5 to OpenCV3.1.0 will resolve "vulnerable version of libpng" warning?
The vulnerable version of libpng in OpenCV 2.4.x was updated in OpenCV 2.4.13.1.
It can be downloaded from here.
As #Simon says, OpenCV 3.x is not affected.
More info: #6694 OpenCV 2.x uses vulnerable version of libpng
Yes, now confirmed with Google: Updating to 3.1.0 will fix the issue - I've upgraded one of my apps to 3.1.0, and while there's a bit of a bug in Google's detection of this vulnerability, I've had confirmation from a support representative that the new version is not vulnerable to this issue.
--
Previous answer:
No - I've upgraded to 3.1.0 and still get the warning. Edit: see below for update
The OpenCV Android SDK hasn't been updated since December 2015, so hopefully a newer version this year will use a fixed version of libpng.
Edit: some odd behaviour on Google Play, and some digging into the version of libpng that that OpenCV 3.1.0 uses leads me to think that 3.1.0 is not vulnerable. I updated my app and the vulnerability warning was still there (with its warning text updated to the new APK version number). Now, however, Google Play has dismissed the alert, though it still confusingly refers to the new version as vulnerable.

Can someone please explain the differences between Cocos2d-Swift, SpriteBuilder, Xcode and CocoaPods?

I'm completely confused and I don't know where to start asking questions. I tried googling, but the terminology is confusing and I'm not sure what either of these things do (except for Xcode). Can someone explain like I'm 5?
I'm on the cocos2d-swift website and after reading the getting started section it says "From this point onwards, using SpriteBuilder is optional.". I don't know what they mean by that.
How do each of these correlate with each other?
Also, how is an API Documentation Browser and Code Snippet Manager useful to an everyday iOS Developer?
cocos2d-swift is a framework that enables you to build things like sprite-based games quickly.
SpriteBuilder is a tool that helps you build your own multilayered sprites (images and animations grouped into a single package -- i.e. Mario, a Goomba, a Fireflower fireball, etc.).
Xcode is a developer environment in which you write your source code, compile, distribute, and test.
CocoaPods is a tool that fetches and manages framework/SDK dependancies.
You would use CocoaPods to fetch the cocos2d-swift framework so that you could build a sprite-based game in Xcode using sprites you generated in SpriteBuilder.
Not sure what Cocos2d is, but swift is the latest programming language by Apple for both OS X and iOS development.
http://en.wikipedia.org/wiki/Swift_(programming_language)
SpriteBuilder is a framework used to create games for iOS very quick. Think of it as a game engine.
http://www.spritebuilder.com/about
Xcode is the IDE (integrated development environment) that you use when writing native OS X and iOS applications. It's awesome!
CocoaPods is a way to load in third-party libraries and frameworks without having to manually install them on your own. It also makes it very easy to keep the frameworks up-to-date. Pods also allows your project to be more portable as it's much easier to install an application with multiple dependancies via Pods.
http://cocoapods.org
A documentation browser is good if you want to have access to documentation while offline. However, I almost always use Google to find what I'm looking for regardless of what technology I'm working on. Google is just the best way to search.
Finally, I'd start off with this book. I read the first edition years ago, and made things very easy for me to understand.
http://www.bignerdranch.com/we-write/ios-programming.html
Hope this helps!
Here are some basics:
XCode (A Program)- Most of your iOS development will happen here. Coding, creating the app etc.
Think of an SDK as a suite of commands or tools you can use-API's (API - Application programming interface)
Cocoas2d (An SDK) - Game engine. A software development kit for creating games. you would pull this library of code and tools into xcode to use it.
SpriteBuilder (An SDK) - Suite of tools for building games. Just like Cocoas, you would pull this into xCode to make use of it as you code.
CocoaPods - A tool for linking/loading SDK's into XCode and easily updating them.
Moral of the story: XCode is the software you will use for everything. Everything else are just additional libraries of code you can pull in.

adding libz.1.2.3.dylib vs libz.1.1.3.dylib or libz.1.2.5.dylib

I am following this tutorial
The tutorial states to add libz.1.2.3.dylib. library, but because I have downloaded newer or older library (I don't know exactly if my library is newer or older that the library in the tutorial, but 99% it is newer). So, when I tried to add the libz.1.2.3.dylib. library, I didn't find it. However, when I typed libz I found these choices:
which one should I choose please?
In using dynamic libraries the one you normally use is libX.major_version.dylib in this case libz.1.2.dylib. This is a link to a library libX.major_version.minor_version.dylib which here is libz.1.2.5.dylib
The rationale for this is that the major version is changed only when the API is changed, the minor version is updated when any change is made. Thus your program should work when it uses any of the same major version and so you want the latest version.
In this case the tutorial had an older install and so its libz.1.2.dylib. should have pointed to libz.1.2.3.dylib.
For you you should use libz.1.2.5.dylib which should be like the tutorials version but with bug fixes and possibly extra functions that don't matter here as the tutorial won't call the new functions.
Normally libX.1.x.dylib would be older than libX.2.y.dylib but the writers might produce bug fixes to the old API whilst also working on the new API
Following on from the rational I gave libz.dylib should be a link to the highest number library but I would not use it as you are writing to a particular API so I would use a version specific (In this case if missing a link the I would not trust what libz.dylib points to)

How to install phonegap Facebook plugin for iPhone

i'm making a project for school and I want to use the phone gap Facebook plugin for iOS, but the installation instructions in the text file is rather complicated. I was wondering if someone got a great link on how to install it, or maybe someone has an example project or even could help me with installing it because I fail extremely in installing it.
Kind Regards,
Bart
I've created this tutorial / example for how to use Facebook inside of Phonegap without the plugin, it is similar but is more expandable and is easy to setup and use.
This explains everything in pretty good detail
http://www.drewdahlman.com/meusLabs/?p=88
check out the GIT
https://github.com/DrewDahlman/phonegapFacebookApp
hope this helps!
PhoneGap posted a YouTube video detailing the install process step-by-step. Note that 1.4.1 is the most recent supported version of PhoneGap - the 1.5 Cordova update is not yet supported.

Resources