ODK, Formhub, Enketo pulldata command - xls

I am attempting to create an xls form that uses the "pulldata" command to reference data uploaded in a csv document. ODK provides an example of this here: link.
When I try to upload their example to a website that allows for the hosting of xlsforms via Enketo (Formhub.org or Ona.io) I get the message "Function "{}pulldata" does not exist." However, Ona.io claims that they DO have this functionality in their blog: link 2.
It seems that "pulldata" and the related "search" commands are not supported by Enketo. I imagine they do work in ODK Collect on Android devices.
I would like to use these functions on web forms (not Android devices). Is there a way to get them to work in Enketo or an alternative for hosting xlsforms / x forms online?
Many thanks

Update:
Pulldata() is now supported in the new Enketo app (Enketo Express). It just requires the form to be transformed with a version of pyxform (XLSForm) after September 5th 2015.

Related

Do WinUI applications need runFullTrust to publish to the Windows Store?

I recently took a stock WinUI template, added my old UWP C# code, recompiled and tried to publish. The Windows Store Application Submission warns me that I shouldn't use the runFullTrust setting:
We detected the use of one or more restricted capabilities in your Package.appxmanifest file. You must request approval to use restricted capabilities by providing more information below. Please include as much detail as possible. Learn more
If you don't need to declare these capabilities or added them in error, you can remove them from your Package.appxmanifest file and then upload the updated package(s).
but here's what I got from the template:
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
I tried removing it, but it wouldn't even compile. Can anyone tell us the backstory of this flag, why it's needed in WinUI but not UWP, and how we get around the Windows Store Submission error.
Do WinUI applications need runFullTrust to publish to the Windows Store?
Yes.
A WinUI 3 app uses the full-trust desktop app model. A UWP app runs in a sandbox.
As stated in the docs, distributing your packaged desktop (WinUI 3) app requires you to answer "a few extra questions as part of the submission process. That's because your package manifest declares a restricted capability named runFullTrust, and we need to approve your application's use of that capability."
So you should provide information about why you need to use the runFullTrust restricted capability when you publish the app. You could for example explain that it's a desktop app and what it does.
WinUI 3 does not need to be full trust, but you still need to declare any UWP-like capacities you are using.
Here is a tutorial that shows how to do it.
https://nicksnettravels.builttoroam.com/winui-appcontainer/

Wrap website with cordova phonegap. What happens with audio files?

I have a learn new language site, that i want to wrap in cordova phonegap.
The app needs to work offline. I also want to make it available on the app store.
The project budget is very low. I need to find a quick way to create this app within the budget and time frame.
My question.
Is it possible to just wrap the whole site? And save it all offline.
What happens to the database? Do i need to recreate the database for the app, use sqlite ect.
Some pages will have audio files, where user can listen to the word pronunciations. What happens to the audio files. Do i need to rebuild this? Or is there a quicker way.
Can all of this be achieved by using cache?
If there is a better way of doing this please let me know.
Thanks in advance
cordova-plugin-inappbrowser provides a web browser view that displays when calling cordova.InAppBrowser.open().
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
The cordova.InAppBrowser.open() function is defined to be a drop-in
replacement for the window.open() function. Existing window.open()
calls can use the InAppBrowser window, by replacing window.open:
window.open = cordova.InAppBrowser.open;
The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs. For this reason, the InAppBrowser is recommended if you need to load third-party (untrusted) content, instead of loading that into the main Cordova webview. The InAppBrowser is not subject to the whitelist, nor is opening links in the system browser.

Google Drive API - Example code is not working

I want to use Google API to transfer SharePoint Documents to Google Drive using dot net. For that to happen I want to use this link Google Quick Start.
I have followed every little piece of information. It states in beginning "Complete the steps described in the rest of this page, and in about five minutes you'll have a simple Drive app that uploads a file to Google Drive" but it is not true.
I am trying to run this sample example since yesterday but failed.
// Register the authenticator and create the service
var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description, CLIENT_ID, CLIENT_SECRET);
var auth = new OAuth2Authenticator<NativeApplicationClient>(provider, GetAuthorization);
So it seems that this code example is outdated and Google APIs have been upgraded.
Here comes the warning
[Obsolete("GoogleAuthenticationServer is not supported any more and it's going to be removed in 1.7.0-beta. Consider using the new Google.Apis.Auth NuGet package which supports .NET 4, .NET for Windows Store apps, Windows Phone 7.5 and 8 and Portable Class Libraries as well")]
Another code
var service = new DriveService(new BaseClientService.Initializer()
{
Authenticator = auth
});
And the error
Cannot implicitly convert type 'Google.Apis.Authentication.OAuth2.DotNetOpenAuth.NativeApplicationClient' to 'Google.Apis.Http.IConfigurableHttpClientInitializer'. An explicit conversion exists (are you missing a cast?)
Then I was looking for [latest release samples] there I found the source files.
I was not able able to run the sample also.
Here I was successfully authenticated but then had error for redirect Uri
My Client_Secrets.JSON looks like, as you can see I have set default redirect Uri to http://localhost/.
{"web":{"auth_uri":"https://accounts.google.com/o/oauth2/auth","client_secret":"secret","token_uri":"https://accounts.google.com/o/oauth2/token","client_email":email","redirect_uris":["http://localhost/"],"client_x509_cert_url":"aa#developer.gserviceaccount.com","client_id":"id","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","javascript_origins":["http://localhost:53404/"]}}
Now I can run this application but as mentioned getting error
Error: redirect_uri_mismatch
The redirect URI in the request: [[http://localhost:2430/authorize/]] did not match a registered redirect URI
I really don’t know from where this port number comes and from where this authorize comes. As you can see in my JSON, I have not set anything similar.
I am using VS 2010 SP1 Ultimate and Windows 7 home Basic.
I have tried to give complete information and my end goal is upload document in Google drive.
The tutorial you are following uses an older version of google.apis thats why you are seeing the not supported. Here are a couple of tutorials on how it works with the new version of the api.
http://daimto.com/google-oauth2-csharp/
http://daimto.com/google-drive-api-c/
Take a look in https://code.google.com/p/google-api-dotnet-client/source/browse/Tasks.ASP.NET.SimpleOAuth2/Default.aspx.cs?repo=samples. It's a Task API ASP.NET sample. As you can see you need to add several lines of code, but it works.
I downloaded the samples Eyal mentions and got that compiling before integrating with my own app. .Net needs to be 4 although it states it supports higher.
You have to set the redirect URI in the google developer console, not in your JSON. In your case, you would want to set it to http://localhost:2430/authorize/.

Update to twitter api 1.1 in flex mobile

I build an app with Flash Builder 4.6 which displays the timeline of a specified user. Since twitter updated their api to version 1.1 I just can't seem to get it to work. According to the dev. site i had to use https://api.twitter.com/1.1/statuses/user_timeline.json, with the parameters include_enties an screen_name.
When I test the operation it says:
{"errors":[{"message":"Bad Authentication data","code":215}]}
How do I get this to work with Flash Builder? I just want to display the timeline; not edit or post things on it.
Must I send some form of authentication from within my code (and if so, an example would be higly appreciated)? Or is it possible to take care of this from within the twitter app (on https://dev.twitter.com/apps/myapp)?
I recently wrote a little mini-lib that works with app-only authentication (which is what you need the read the timeline):
https://github.com/denisdanielyan/as3-Application-Only-Twitter
See Pin based authorization for Twitter.
For the authorization process itself see Authorizing request

How to integrate website with client-side application?

I want to develop a webapp using ASP.NET but it have to use some client-side functionality provided by desktop application also developed by me.
Existing example: in Picasa Web Album you can click a link called "Download to Picasa" which opens Picasa desktop application and downloads album.
I suppose it require different approaches on different platforms. What are the possibilities to make it work on both Windows and Mac OS X?
Register a custom URL Protocol Handler. Look here: https://stackoverflow.com/a/2429803/449906
I don't know Picasa in detail, but your case sounds like, you start a download by clicking the link "download to picasa". This download will start a link like this:
picasa:///downloadfeed/?uname=ASDFASDFASDF .....
According to your OS any protocol may be associated with a different external program. For information on this you may have a look at the mozilla board .
REGEDIT4
[HKEY_CLASSES_ROOT\foo]
#="URL:foo Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\foo\shell]
[HKEY_CLASSES_ROOT\foo\shell\open]
[HKEY_CLASSES_ROOT\foo\shell\open\command]
#="\"C:\\Program Files\\Application\\program.exe\" \"%1\""
If you start such a link, your external programm will start and do what ever you want.
hth

Resources