I am trying to set up the open STF with the provider service, with Docker and was hoping if any one could walk me through it.
I followed through the guide and many of the suggestions here, but I could not get the proper solution.
As you note, there is not currently a complete guide to starting up STF using the provided Dockerfile: https://github.com/DeviceFarmer/stf/blob/master/Dockerfile
I have written a more fully functional / complete example using docker-compose that can be found here: https://github.com/DeviceFarmer/stf_ios_support/tree/master/server
To start it up docker-compose up. You will need to also run a "provider" to provide a device to the server.
For providing an Android device you could use the stripped down STF code just for that purpose here: https://github.com/nanoscopic/stf-android-provider You can also use the main STF repo, but it is more difficult to build due to having many more dependencies. Note that Android device provision code is still dependent on Node 8. Higher versions of node won't work.
For providing an IOS device see https://github.com/DeviceFarmer/stf_ios_support
Setting up STF is non-trivial. Expect to have to do some measure of investigation, reading through source code, and trial and error.
Related
I'm trying to compile Python code directly on my Android phone via QPython 3L and it's fine for some initial examples.
Now I want to read the call log and here is my code.
from androidhelper import sl4a
droid = sl4a.Android()
myconst = droid.getConstants("android.provider.CallLog$Calls").result
print(myconst['CONTENT_URI'])
calls=droid.queryContent(myconst['CONTENT_URI'],["number","duration","date","type"]).result
At the last line above it throws a NullPointerException and - after many trials&errors and searches on Google - I'm pretty sure that the root cause is a lack of authorization.
Can you confirm if this is the case (or you spot a bug, contrary to what I believe) and please point me to some documentation, for adding the authorization request, if that is appropriate to my specific code context?
Sometimes to solve programming issues like this, one needs luck, a lot of fantasy and an extreme willpower.
The solution (once one really knows what to do and where to search) can be found on this github page.
The FAQ reads:
A: Why are there so many branches? Q: Because Google Play and some
appstores have strict requirements for application permissions, they
require different permissions, we use different branch codes, for
example, 3 means it is QPython3, L means LIMITED, S means SENSITIVE
permission is required.
After a special (one-off) installation via download on Android, you have to manually add the Telephone permission to the application, using Android permission management. The downloaded app will replace the one installed via Google Play and you'll find your script already there, ready to be run, hopefully without the NPE.
I'm working on creating a CordApp which I'm expecting to run on user's phone. Android as a starting point. From my reading so far, Android phones do not have a JVM running on the phone and the compiled code is converted into either Dalvik or something similar.
Has someone tried to install their CorDapp on an android based mobile device?
I'm a nooby in the area of CordApp as well in android apps but hoping that I can find some good starting tips here. Thanks for help.
The bottom line is that Corda needs a JVM environment to execute. The most light-weight test we have tried is Raspberry Pi with 2G Memory.
(answering the follow-up in the comment above)
You might be able to run several distinct nodes on some server. However at that point there would be little point in using Corda in the first place.
Once you run a node "somewhere else" the user won't own the private key for its node, and all the safety of using Corda disappears. You're reverting to a 'trusted third party' model.
I'm trying to develop own Android application using ANT+ sensors.
My app is based on (developer's Sampler code and SDK).
However I found the strange thing during tests. I mean when I start to searching devices I immediately receive a message:
W/AntPluginPcc: BBD30600: RequestAccess failed: OTHER_FAILURE
At first I suppose that a reason of this problem is that I have a phone with Marshmallow OS (instead my wife's phone is based on Lollipop OS and all works fine). I tried to find anything in documentation related this but didn't find anything interesting. I add to Manifest some permissions (I mean com.dsi.ant.permission.ANT, android.permission.BLUETOOTH etc.) and set the permissions in code, but it doesn't help to me to solve my issue.
May be anybody received this problem and may be somebody solve it. Could you please share your solution to me?
P.S. I install the ANT+ Plugin services, ANT Radio Service. in App I use the ANT+ SDK from github. May be I should use also the ANT SDK? (I want to connect to HRM and cycle devices which use ANT+ protocol)
If you have the same problem as I you need to realize the AntRadioServiceConnection class.
I found it here.
And you should be sure that you have all services and plugins installed on your phone.
Really hope someone can assist, we are using Azure Mobile App Service and everything works fine in the editor and on IOS, we only have a problem on Android when trying to update an existing record.
According to the Azure resource documentation you need to use Patch
PATCH /tables/tablename/:id Update an existing record in the table
When testing on an Android device it does not even try to send the web request it simply returns error: "Unsupported Protocol"
The research shows that there are workaround solution but I have not found anything relevant to Unity.
I did a search on the forum for HttpMethod.Patch but could not find a single article. Really having some trouble understanding how to resolve the issue and if there is a way to resolve it in Unity.
Any help would be greatly appreciated.
Just thought I would add this, according to the Unity documentation found here: https://docs.unity3d.com/Manual/UnityWebRequest.html
Platforms supported in 5.3:
Mobile Platforms: iOS, Android, Windows Phone 8
Set HTTP verb (GET, POST, HEAD, etc.)
Custom verbs are permitted (So we added Patch)
This should work no problem, but it does not even try to do the UnityWebRequest it just returns the error: 'Unsupported Protocol'
Seeing that the official documentation states that this should work, could this be a bug in UnityWebRequest?
Thanks in advance.
P.S. we have posted this on
http://answers.unity3d.com/questions/1230067/trying-to-use-patch-on-a-unitywebrequest-on-androi.html and we haven't heard any reasons, that is why i am posting the question here. Please if anyone knows anything about this topic to shed some light.
According to the API reference of UnityWebRequest, it seems to not support PATCH verb by default, besides following the definition of PATCH verb to construct a request with method PATCH and other parameters in UnityWebRequest. It's just my understanding above, because I could not find any information about PATCH verb with UnityWebRequest.
However, according to the issue information Unity Web Request and Json Utility, you can try to follow the GitHub project that using UnityRestClient instead of UnityWebRequest to update Azure Mobile App table record.
Hope it helps.
Azure SDK for Android uses okHttp library, which supports PATCH. However, Unity's webrequest uses native Android networking which does not support PATCH.
Just made a simple workaround using Easy APIs: https://github.com/dgkanatsios/AzureServicesForUnity
One workaround is to install "method-override" which works with Azure App Services (node backend).
Add "method-override": "^2.3.7" to your "package.json" dependencies by running:
npm install method-override --save
Insert the following to your "app.js" express app config (this is explained in the method-override readme)
var methodOverride = require('method-override');
Then after the line var app = express(); add:
app.use(methodOverride('X-HTTP-Method-Override'))
Now change your update request from "PATCH" to "POST" and add the header:
X-HTTP-Method-Override: PATCH
Then enable the x-http method override header and allow you to send a POST request on Android which will be seen as a PATCH request - this will process the update successfully.
Background
I wanted to simplify the usage of DB in an Android app.
For this, I've compared some third party libraries that create a DAO layer.
I've come up with a nice library called "GreenDao" (presentation about it here) . The website shows that it's faster than other competitors (like ORMLite) and is optimized for Android.
The problem
For some reason, on some device (usually old devices, with GB) , I get the next console error when trying to install the app:
Installation error: INSTALL_FAILED_DEXOPT
Please check logcat output for more details.
Launch canceled!
I've searched for the reason of this error, but couldn't find out how to solve it. Many complain about this error, but I can't find out why it occurs, and what can be done.
The error is quite common and known, but it's never mentioned as the result of using this library, yet when I remove the usage of this library, everything works fine...
Also note that on newer devices (like nexus 4) it installs and works just fine, and that the sample itself also works fine no matter which device I test it on.
The question
Why does it occur?
Is it possible that the structure of the classes is just too much for old devices to load, since we use other libraries ?
Could it be that I've reached the limit of code that is supported by android apps?
The jar file itself takes just 87KB ...
How can I solve this?
Ok, I've found the problem and the solution:
It has nothing to do with GreenDao.
It's because the app uses too many jars, so maybe Android has a limitation of code.
The solution is to either delete un-needed jar files or delete a lot of code.