Android: Installing Wikitude on Android Emulator - java

I'm trying to write some apps using wikitude, and I'm having some problems running even the example.
I've put the sample ( BasicOpenARDemo ) that comes with the SDK inside eclipse and tried to run it, where I encountered the next error: "wikitude was not found on the system. Please press the ok-button to access the Android market and download wikitude."
First question- I don't understand- Why am I approached to download the utility when I have a standalone sample inside my eclipse? Doesn't the core files behind Wikitude come with the SDK or the sample itself?
The next question will be - after some googling, I've found that in order to install this "Android market" I need to follow the manual that comes in the 9th message in the next thread (the message that was written by ronni.rasmussen) -
http://forum.xda-developers.com/archive/index.php/t-529170.html
Well, I've followed it, and now when I try to press the OK button that comes after the "wikitude was not found on the system..." message, I get redirected to the Android market, where I find Wikitude, but when I try to download it- I get a "Download was unsuccessful. Please try again" error message. How do I fix that?
One more thing that I don't understand- How come it's written in this offline Android market that the available wikitude version is for android 1.5 and no longer maintained?
As you can see- I'm quite baffled here. Hope someone could clear this up for me.

I was with the exact same problem. The problem was that installing Wikitude from the market (following the link you provided) does not guarantee to have the system requirements supported in the virtual device, therefore it gives an error when you run the BasicOpenARDemo, if it let you install it at all.
The solution was creating an AVD with an GoogleAPI (it includes maps support, I used the level 10 API for Android 2.3.3, it didn't work for the level 8 API), adding the camera, accelerometer, compass, GPS, etc., support to the virtual device (I did this via Eclipse). Then I downloaded the .apk for Wikitude and installed it via command line (.adb).

Related

"Source code does not match the bytecode" for system files on Huawei

We are debugging an issue with one of our apps which affects only Huawei devices. To debug it, we purchased P20 Lite ANE-LX1. We've placed some breakpoints in our code and are investigating the full stack trace. The device has Android 8.0 installed, and we have the same SDK downloaded in our Android Studio.
When we attach our device to a debugger and try to investigate the stack trace we get the following errors in system source files:
After playing with the stack trace, we can confirm that indeed our source files do not correspond to what is installed on the device. Sometimes, the debugger points to a line where functionA is called, and in the stack trace, we see that functionB is called instead. The files which we could confirm are affected by this issue are:
VideoView,
MediaPlayer,
ContentProvider.
We've tried all the possible solutions which we could find, including cleaning the project, deleting any additional SDKs from Android Studio, modifying project settings - nothing helps to resolve this issue.
This leads us to believe that Huawei installs a modified version of Android 8.0 on their devices which is why we cannot debug the stack trace for the system files. We did contact Huawei to try and clarify this.
In the meantime, we'd appreciate if you could throw any relevant ideas at us. Maybe you know where to get the source files which Huawei installs on their devices? Or maybe you know how to fix this mismatch between source code and bytecode in some other way?
Update 1
Following the advice of Robert, I uninstalled the source codes for Android 26 and ran the app again on my Huawei. As soon as I jumped into the VideoView file, I saw the following picture:
I clicked on "Download" and it started downloading the source files:
After this, I was able to step into VideoView and it seemed to work fine. However, after this line it became obvious that these source files are also wrong:
When I try to step into the requestLayout function I get this:
And it is obviously a wrong result. In fact, if I click on "Step to the next line" I see the message about source code mismatch with the bytecode again.
Apparently Huawei forked AOSP and modified it's sources. This is what many manufacturers do and it's perfectly fine as long as source passes the Compatibility Test Suite. I myself saw encrypted video playback issues on Huawei P20 related to their approach to customizing the ROM.
But getting back to the point - you can get the exact framework code running on your device from /system/framework/arm/boot.oat or boot-framework.oat or /system/framework/boot.vdex. I don't know exactly how these files are structured but it varies between Android versions and between manufacturers. Once you get these files by adb pull (You surely need root to do this) you can perform oat->dex, dex->jar using dex2jar or other tools and you'll get the source. Traditionally it was possible to get framework code from /system/framework/framework.jar but after ART was introduced these files are often empty on system images and precompiled framework code is used instead.
I believe I ran into a similar issue on my phone, but I am using a Google Pixel. I was initially concerned that the phone was compromised somehow. I think it is less likely an issue with Huawei and more likely an issue with Android Studio not keeping the source packages up to date. Your Component Installer screenshot shows Android Studio downloading revision 1 of the SDK Source - yet most SDKs are using a later revision.
I detailed the solution to my problem elsewhere on StackOverflow: Source code does not match the bytecode for Android's View.java

Android studio app not able to parse on phone

I have been developing an application via Android Studio for some time and testing it on my phone (Galaxy S5 Active) using the app-debug.apk file. I would update the .apk then send it to my email.
On my phone, I would download and install the app and test it to see how it works.
Recently, however, I get an error:
Describe
There is a problem parsing the package.
Before, my phone would warn me about installing apps from unknown sources, to which I would just turn off the warning and it would install anyways. It no longer makes it to that point.
The odd thing about this is, other people are able to install the app still. My phone seems to be the only one that no longer wants anything to do with it.
I have looked into other options but none have seemed to fix my issue. I tried using AndExplorer to install it, same error. Ive uninstalled the old version. Ive even tried installing a different application that I made quickly to test.
Any thoughts on what the issue is?

Eclipse to Android studio

So I have a project done which I made in Eclipse, I have also exported it as a Android and somehow imported it in Android Studio, But when I run the program in Android studio, it will execute as Java. And what I want to do is to make it execute in a Android phone (Can also be in a simulator)
But I have not found any tutorials on how to do it and I really need to do it since the essay is ending soon. So I would appreciate all help!
If more info needed, Please, Just comment. I will be available here next 2 hours!
The process should be quite simple if you have already succeeded in importing the project into Android Studio.
If you are using a Mac the process is very simple. If you are using Windows then there is one additional step described below:
In the AndroidManifest.xml make sure you have android:debuggable="true.
If you are using an Android phone with API 4.0+ then go into the phone's Settings and click on About Phone seven times. This might seem like a strange thing to do but it unlocks the phone's developer options, which are hidden by default. On older phones just go to Settings -> Applications -> Development.
In the Developer options select to allow USB debugging.
Now, connect the phone to the computer using a USB cable. You will probably see a message on the phone asking you to authorise the computer for that phone.
Next, open Android Studio and run your application (using the green triangle in the top toolbar). If the arrow is greyed-out then then there was a problem importing or building the project.
Wait while the project builds. It isn't that obvious that the project is being built. The only indication might be that there is a small spinner. If the build process succeeds you will see a prompt to choose a device. Your phone should be listed there. If it isn't, try disconnecting the phone from the USB and reconnecting it.
Select your phone, click OK and away you go. The application should launch on the phone after a few seconds. If it doesn't, be patient sometimes it takes a while. If it still doesn't work, check back in Android Studio for any errors.
Windows Only: Windows requires the additional step of installing the phone's drivers. Details can be found here http://developer.android.com/tools/extras/oem-usb.html

How to run Java app in Android

Is it possible to run java app (jar) in my android application? Because I need to create PDF, the problem is if I generate PDF in android, only can show with small image, if it contains large image in many pages, it will be error. So I think, I can generate PDF in java and then included to android app.
Concernig the mentiones app JBED:
Well honestly, I could not find any credible source for this tools JBED, so I would really be very cautious (e.g. who is the developer?)
In the manifestfile (in Androidmanifest.xml, where every app has to state what rights it needs to run, see How to view AndroidManifest.xml from APK file?) there are many rights mentioned (what could be necessary, as the app wants to run as an emulator), so a java application might want to send an SMS, record audio, take pictures and place calls -- so the emulator would need those rights as well.
But then the app also registers the "android.intent.action.BOOT_COMPLETED" event (i.e. autostart after boot) and this would go against every description of the tool.
Ah yeah and giveaway: The apk has a folder "certs" that has some (root-)certificates. But those are not the real certificates of the authorities, e.g. Versign. If one installs the app and by that those certificates the trust you might have in https-connections is lost because those who made the fake certificates can create own, false certificates that your phone would trust.
I assume (or am pretty sure) this is a spy tool, but I could be wrong. The (rare) testimonials that claim the tool ran perfectly will probably be the same person that posted the tool under a different name.
Andreas
You can import java Third-party libraries into Android app, follow the steps here.
I am not sure whether it will work,but just try.
If your program is a console program, the answer is yes.
Install Jvdroid from Google play. Click terminal and then write this command: java -jar YourJarFileName.jar
The simplest way would be to some install terminal emulator and then install java and then you can run java apps on standard java. You can even install full Linux distro with x server without rooting the phone, then connect to it from x client and you have Linux desktop on android. Once I've even installed eclipse for java development on it and everything worked. I tested this setup last time in 2014, but I'm pretty sure you can do this nowadays as well. The app with Linux I get from play store as well app for the x client. The app I used back then was "Debian no ROOT" or smthg like this. You need to check what's currently available to make this setup in Google Play store according to your android version and your preferences. Last time I've checked there was a lot of different tools for this kind of task. Lastly I've even successfully installed TF and keras on my android phone using terminal emulator.
You can use JBED. JBED is an .apk Android application which run java games and app on your android Device. JBED is a java android emulator, by using
this application we can install .JAR/.JAD/Java/J2ME/MIDP app on android phones.
You can do it quite easily as there are many ways to run java apps on android. Specific application called Java Emulators can do it quite easily.
These are four most popular java emulators for android viz, JBED, PhoneME, Jblend and NetMite. These are arranged in order of their preference. You can use phoneme for non rooted device, however if your device is rooted try any of the remaining three applications.

Win7 x64 Bluecove

I'm trying to use Bluecove for an application I'm writing. Version 2.1 of the jar didn't work, so a little Google showed me that it had always had issues with x64, so I turned to the latest 2.1.1 "snapshot", and I still get that the bluecove_x64 dll is missing. Am I doing something wrong, or should I just look for another API?
I encountered this problem after installing a vendor's bluetooth stack and management utilities. My java app which used bluetooth worked fine before this, after the install I got the bluecove_x64.dll not found error. After much searching, I reverted to an earlier system checkpoint (before I tried installing the "newer" bluetooth) and all was back to normal.
On another system, the toshiba bluetooth software had already been installed. I did a system checkpoint (in case the following was to not work), then went into the device manager, and uninstalled every "device" under bluetooth. Be sure to check the "delete driver software" box too, or they will come right back.
After this, the bluetooth device will appear to be gone. Go to the top of the tree, right click, and do "scan for hardware changes". This should install the Microsoft generic bluetooth drives which then work (for me) just fine on Win7_x64. If this doesn't install them, then you may try searching for a download, or another stack.

Categories

Resources