I am making a VR application for Android. I need to use a webview inside the application.
I searched for a webview for unity and I found many webviews, but it has problems when trying to use it with VR application, either they are not working at all or they open as a full screen and they hide all application components.
What I need is a webview that can be used in VR application for Android devices just like this webview: " http://jerome.gangneux.net/images/vr/part4-webview-1280.png ".
I don't care if it is free or I am going to pay for it.
Instead of using webview, I suggest you to use Layout to add UnityPlayer to that layout. I have tired to do in the following ways,
Step 1 : Generate Android project in build setting from Unity
Step 2 : Copy Data folder from src/asset/Data from generated Android project.
Step 3: Replace Native Android App Data folder (i.e. app/src/asset/Data )
Step 4: Copy UnityPlayerActivity from generated Android project (you can find 3 Unity activities).
Step 5: Keep those 3 activities in Native App. You can use UnityPlayer where you want to add in the layout.
So No need to create Android plugin and add it in Unity project.
Kindly let me know if you have any queries.
Related
I'm developing an Android app and I need to integrate Unity games/screens in it. I've already exported and added one Unity scene/project to my android app but I cannot figure out how to add two.
I found two main approaches to this:
Create two separate projects: If I do this they clash either in the manifest or in the libraries/assets folder and unity ends up calling just one scene.
For reference:
How to correctly import multiple unity module in single android app avoiding name conflict between different unity module in android studio?
I also tried creating one Unity project with multiple scenes and use messages to call the required scene from Android. For me, Android still calls the same scene regardless of which button is pressed.
Reference:
https://stackoverflow.com/a/43224821/2617578
Does anyone have a solution for this? Either one of the solutions mentioned above would be okay for me.
I'm experienced in Android but a beginner in Unity so I think I might be doing something wrong in the unity code.
I have the unity projects and Android apps I created for the second approach in the following git repository.
https://github.com/hadi-mehmood/AndroidUnityIntegrationSample
Here is one solution to your problem:
First, All things happen inside unity are in one activity.
Combine two unity projects and make different scenes for each of them
create a empty loading scene that starts first (using unity BuildSettings) and does not do anything
on the loading scene, write a SceneLoader script to wait for a command to load a minigame scene.
you can pass the scene name using this method UnityPlayer. UnitySendMessage("Gameobject Name","Method","Message")
right after running Unity Activity call the method above and it should do the work.
Sample SceneLoader:
public class MySceneLoader : MonoBehaviour
{
private void LoadScene(string sceneName)
{
SceneManager.LoadScene(sceneName);
}
}
i have an existing project on others pc, however, when i move the project files into another computer, the project itself unable to show the drag and drop view in the xaml file, it show the code view instead of drag and drop, how should i do to make let me see the designer view??
Are you using the Core Framework of xamarin or Xamarin Forms ? (I'm asking because you are talking about xaml files instead of xml)
If you are using the Core Framework juste have a look to this link coming from the xamarin documentation :
https://developer.xamarin.com/guides/android/user_interface/designer_overview/designer_walkthrough/
One last thing, instead of copying the files use a version management tools if is not the case (like github or bitbucket)
The installed Android SDK is probably too old. Consider updating it.
hi¡¡¡ wish you can help me with this problem¡¡¡ thanks in advance.
I've made a project in a drag-and-drop builder for
creating cross-platform mobile apps and websites, and now, i want to make an app native, apk extension, in order to take it into Android Market. After finish the project, i receive a source code bundle for Eclipse (phonegap project).
The link to the phonegap project is this http://www.mediafire.com/download/i3keb345k8y51lh/codiqa-android-f6e7a438-1377719055.zip
Everything works really fine in the project, but when i make the apk archive.......... is not so fine.
Let me explain you, step by step what i am doing, maybe you can tell me if something's wrong and how i can fix it.
Step 1: I export my project as phonegap project (android). I receive a *zip, and i unzip it in my computer .
Step 2: I open Eclipse program and create a "android project from existing code" (file>new>project>android project from existing code")
Step 3: I select the root directory where i've unzipped my codiqa project, and click finish.
Step 4: I export the project as an Android aplication (right button>export>export android application), follow the steps, and i get my application. (In the Manifest, i change debuggable to false.)
Step 5: I install it in my phone, and now come the problems.
Problem 1: I can not open anything from my app. For example, when you normally open a file o website in your phone, you can receive the standard "what program do you wish to use", but not in my app.
Another example, i have a mediafire link in the app in order to download an archive,.......... no matter how many times i press the download button, never work, never download.
Hope you can tell what's wrong and how to fix it, THANKS¡¡¡
You might need to try different platforms.
Sigma Mobility http://sigmamobility.com/ allows building mobile apps using jQuery for free through drag and drop feature, it also allows one to attach Java scripts and CSS styles.
you can through app preview download the source code , and to get cordova project source, you might contact SigmaMobility support for the same.
I am new to android app development. I need to develop a very simple app that could detect coloured circles.Can someone please tell me in detail how to use openCV Circle Recognition code in developing a simple android app that can detect coloured circles. I am currently using openCV+ Eclipcs but it does not allow me to compile the source code in to .apk file
I have already done what u are saying...I have done the following
I download the full NVidia tegra-devpack-2.0-windows-2013-02-06-14961502 and installed It contains both android ADT for eclipse and eclipse also. It also contains the open CV and it automatically configures everything.
Everything works fine when I make a new android app like “my first HELLO WORLD app” and I can even install it to my android phone that means everything is working fine and everything is configured correctly.
The problem arises when I try to import the source code of the “CVCamera” an common app for detecting circles in android devices
When I import it in the eclipse as an android project from existing code it gives me following 2 errors
(a) Project 'CVCamera' is missing required Java project: 'OpenCV'
(b) The project cannot be built until build path errors are resolved.
I have tried lots of things I even tried to link the open CV library to the project but of no use
I have a simple objective I want to develop an android application for detection of coloured circles by using the already available code on the web. Please help me in achieving the following
I am using openCV4android . I can even create new apps but the problem arises when i try develop the application by using already made source code. I am using the sources code of the CV camera app which has been already developed by so many developers Following is the link of the error I am getting in the eclipse.
Please see the image
Following is the link of the CV camera application which I am trying to import
stanford.edu/class/ee368/Android/OpenCV/CVCamera_Canny.zip
Here is the link for another error “Build path entry is missing: OpenCV”
image
building workspace problim image
Use opencv4android in eclipse.
Before that you should deploy android ADT for eclipse, or download bundle for android dev.
Then follow the tutorial at opencv official site to start your way to android.
Use hough transform for circle detection.
You must link JavaCV lib into your project rather than OpenCV.
Android app cannot use OpenCV(C++) unless you use JNI, which is far beyond the scope of this question.
So please follow the tutorial for using JavaCV on Android rather than doing the import stuff on your own. Please make some JavaCV examples compile and run on your phone before you try to adapt the code.
Besides I strongly recommend you use openCV4android, which is sure to work, rather than JavaCV + Android, which takes your considerable time coping with configuration and integration.
I am working on an android group project in college and this is the first big project many of us have worked on.
We worked on implementing several pieces of the project as completely separate projects and now are having trouble putting all of them in one application with a main page.
On the main page of the application we would have a bunch of buttons that would then go to the implemented project that we've completed (example, I click on BMI calculator on the app homepage and it goes the the bmi calculator screen).
Any efficient way of going about this that can be explained in an easy to follow manner? I'm still a newbie programmer :)
Just to clarify, I don't want it so that it just launches a BMI calculator app from the main app, the entire code base is supposed to exist under one app.
Thanks
You can have a main project and several other projects declared as library projects.
In build time, library projects are pulled into the main project and only one apk will exist as the output.
The library projects are almost the same as an usual android project. You can have java packages, res folder, lib folder, etc.
Check here for the official description.
Check here for a tutorial.
Look into making the other applications as Android Library-projects, and listing all necessary components on your AndroidManifest.xml on your parent project.
Another way would just give the option for the user to install these applications as separate and have a logice (PackageManager) check if specific application exists or is installed and then enabling navigation buttons or disabling components and invoke them via Intents.