How can I download a file from a smart device with Genexus? - genexus

I need to download a file present on the server using a button in an android app created with genexus 16U11. In a web environment I can use this procedure https://wiki.genexus.com/commwiki/servlet/wiki?14144,HowTo%3A+Downloading+a+File+using+HTTP+Protocol
but it doesn't work for a smart device, when I press the button I get an error "Error in the application server (org.json.JSONException) but I can't find more details with logcat or in the event viewer.
Does someone have a solution?

Related

Uwp - Invalid value for registry

I have an uwp app, which is being distributed using SCCM and every time after a new release is distributed, when a user tries to open the app using the protocol (Eg. Appx:\) an error is displayed by Windows saying "Invalid value for registry" . If the user opens the app using the ícon on the startup menu, it opens without problem and after that there is no problem openning the app using the protocol anymore.
Anyone have any idea why? And how to solve it ?
The uwp app is built over windows anniversary update.
Thank you

Appium Desktop for Windows: How to call device's browser. Error "...com.android.browser not found"

TL;DR:
When I have an emulator open, and I try to call the browser using Appium, I get an error saying that the browser isn't callable, even though there is a browser in the device. Not sure what it's called, so I can call it in Desired Capabilities.
Long story long:
I'm new to Appium so trying to get a basic emulator session going. I'm new to Java too, but I'm not using Java here and the Appium site video didn't require Java to get a basic session going, so this isn't a "your code is rubbish" Java issue. (Video link I watched: https://youtu.be/IOSUBda2-g4, though this didnt' call a browser on the device so wasn't a helpful guide for newbies like me).
On Win10, I installed Appium Desktop for Windows (current version 1.2.0 beta).
I have Android Studio installed (v2.3.3), and an image for a Pixel device.
I open Android Studio > Tools > Android > AVD Manager > Pixel API 25 (which is set up using Android 7.1.1 and API 25) and I start the emulator.
The emulator opens, and the first thing I see is "Photos has stopped Close app" and an X. Somewhat worrying but hey, I installed the image from AVD Manager so I got what I got.
If I then go to Appium Desktop (host 0.0.0.0, port 4723) and start the server (v1.6.5), I get the console.
I click Start New Session, and the settings screen comes up.
I am on the Automatic Server tab.
I go to Saved capabilities tab.
I have these settings saved:
{
"platformName": "Android",
"deviceName": "Android Emulator",
"browserName": "Browser",
"avd": "Pixel_API_25",
"platformVersion": "7.1.1",
"": ""
}
NOTE: The last empty entry is because the delete button on Appium for the Desired Capabilities has no effect in this version of Appium Desktop.
I click "Start session" in Appium Desktop.
Since the emulator is already started, I get error "An unknown server-side error occurred while processing the command. Original error: Could not find package com.android.browser on the device"
There is a very simple browser on the Pixel phone, but I can't invoke it because I don't know what it is called. There is no Chrome or Firefox installed by default. If I go on the device I can run a Google search in this basic browser, but I don't know what it is called to try to invoke it from Appium.
I'm trying to use the guidance in https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md but I'm lost, and trying stuff with no success.
QUESTION: What is the browser called so I can invoke it?
Why am I trying to do this?
I actually wanted to invoke a basic Calculator.apk that I have locally, but that didn't work either (it never started when I specified "app": "C:\android\Calculator.apk"), so I thought I should start with a basic browser session rather than APKs.
I tried the same as above with API 26 but that didn't work either.
I haven't solved the APK invoke issue, but that's likely another issue.
Any assistance with the DCs much appreciated.
Mike

Xamarin - How do i display a pdf file from ftp server in forms

I have to display a pdf file from FTP server in Xamarin on iOS and Android.
Not able to display the downloaded file, I am okay to display it within the App or OS default viewer.
the most easy way is to save this file to your device local storgae and use Xamarin Web View to display it.
it is very easy , you can find step by step on this article:
https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/controls/display-pdf/

Error: Could not load the assembly file

I got the following error when running my first HelloWorld Windows phone 7 application.
Could not load the assembly file://\linkdotnet.local\linkdev\salma.mohamed\my documents\visual studio 2010\Projects\Assign1\Assign1\obj\Debug\Assign1.dll. This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information.
Any Idea how to resolve it.
Thanks alot in advance.
I am assuming this assembly was in a zip file you downloaded from the internet? if that is the case you need to 'unblock' it. Right click the assembly within Windows Explorer, the click the 'unblock' button. See the example below:
A likely cause of this error is if you load you Windows Phone project from a network share. Visual Studio will not trust the DLLs in this case. If you move the project folder to a local machine it will work (if this is the issue in your case)
ColinE this is not that at all:
This error is typically when you didn't have followed the unlock process as requested by MS and compile on the device instead of Emulator.
To unlock, follow the MSDN steps:
Turn on your phone and if necessary unlock the phone screen.
On your phone, ensure that the date and time are correct
Using the USB cable that came with your phone, connect your phone to your computer
On your computer, the Zune software starts automatically. If Zune does not start, then start it manually.
On your computer, click Start, click All Programs, and then click Windows Phone SDK 7.1.
Click Windows Phone Developer Registration.
The application starts, as shown in the following image. Verify that the Status message displays Phone ready. Please enter your Windows Live ID and password and click "Register" to begin.
f your phone is already registered, the Status message will indicate this and you will see an Unregister button.
Enter the Windows Live ID and password that correspond to your App Hub membership.
Click Register.
As referenced in MSDN
that way you will always be able to use your phone to test your application "in situ" instead of the emulator.

Create PDF file in WP7 using C#

I want to develop small application for WINDOWS PHONE7 in which User enters Transaction details eg.Transaction Amount and Bank code.
I want to create new PDF file and write this data in it.
I tried adding iTextSharp.dll but is gives Error: Reference cannot be added it Windows Phone project will work with Windows Phone assemblies.
Please suggest other way or assemblies available for it.
You cannot do this on the phone. So don't do it on the phone. Do it on a server in a web service. You can deliver the PDF back to the phone if that is its final destination, or email it directly from the server.

Resources