Re: Question: Mobile Development
Lei Salcedo
Hello Tim,
Yes. I've added all the permissions (locations, contacts, etc.) Works on the a lower version of the handheld (android 7.1). But for android 8, does't seem to work as it is.
|
|
Re: Question: Mobile Development
Tim Downie
Are you sure the application has the android permissions it needs. Ive had problems with this on different devices - if you go and manually add allow location etc to the app - then see if it loads
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Lei Salcedo <Leilani@...>
Sent: Wednesday, 19 February 2020 8:19:22 PM To: main@magicu-l.groups.io <main@magicu-l.groups.io> Subject: [magicu-l] Question: Mobile Development Someone help me on this.
I'm a newbie in mobile dev. We've got an existing mobile app that I need to install on a new device with an android version 8.1 (API 27) for a new requesting company. Our current one in the production which seems to be no problem and working perfectly is on android version 23. So what I did after some readings, I installed the platform 27 and build tool 27 on my dev environment and created a new apk file then installed it on the device. APK build is successful as well as the app installation. But upon opening the app on the device, it opens the initial screen (with our logo on it) and then it closes immediately with an error message - "application has stopped". I have little experience on this so I don't know how to move on from here. BTW, The handheld device is quite good in terms of specifications. See below: SYSTEM ARCHITECTURE Processor: 2.2 GHz Qualcomm® Snapdragon™ 660 octa-core Operating System: Android 8, upgradable through Android R Memory: 3 GB/4 GB RAM, 32 GB Flash Camera: 13.0-megapixel color camera with autofocus and advanced software features for better image quality Display: 106.7 mm (4.2 in) FWVGA (854 x 480) bright color LCD with backlight, outdoor viewable, optically bonded to touch panel Help anyone
|
|
Question: Mobile Development
Lei Salcedo
Someone help me on this.
I'm a newbie in mobile dev. We've got an existing mobile app that I need to install on a new device with an android version 8.1 (API 27) for a new requesting company. Our current one in the production which seems to be no problem and working perfectly is on android version 23. So what I did after some readings, I installed the platform 27 and build tool 27 on my dev environment and created a new apk file then installed it on the device. APK build is successful as well as the app installation. But upon opening the app on the device, it opens the initial screen (with our logo on it) and then it closes immediately with an error message - "application has stopped". I have little experience on this so I don't know how to move on from here. BTW, The handheld device is quite good in terms of specifications. See below: SYSTEM ARCHITECTURE Processor: 2.2 GHz Qualcomm® Snapdragon™ 660 octa-core Operating System: Android 8, upgradable through Android R Memory: 3 GB/4 GB RAM, 32 GB Flash Camera: 13.0-megapixel color camera with autofocus and advanced software features for better image quality Display: 106.7 mm (4.2 in) FWVGA (854 x 480) bright color LCD with backlight, outdoor viewable, optically bonded to touch panel Help anyone
|
|
Re: .NET asynchronous methods and functions
Freddy Dewulf
Hi group,
Thanks for the remarks. Steve, I will download the examples. Freddy
|
|
Re: .NET asynchronous methods and functions
Craig Martin
I would no longer use snippets but I have a really old c# snippet that utilizes async calls using
using System.Threading.Tasks;
and a
public static Task CallNode()
{
Task t = Task.Run(() => AddNumbers());
t.Wait();
return t;
}
style example construct.
I think. 🙂
You could try that. Just to be difficult.
--
“Anyone who isn’t embarrassed of who they were last year probably isn’t learning enough.” Alain
de Botton
Craig
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Andreas Sedlmeier <sedlmeier@...>
Sent: Tuesday, February 18, 2020 2:54 PM To: main@magicu-l.groups.io <main@magicu-l.groups.io> Subject: Re: [magicu-l] .NET asynchronous methods and functions On Tue, Feb 18, 2020 at 05:19 PM, Freddy Dewulf wrote:
Is it possible in Magic XPA 3.3 to use async functions in .NET snippets.Could be me and I wrote something re that a while ago either here or somewhere else and async / await is not possible with Magic Snipology because what Magic uses in order to compile the C# has a .NET Framework 2.0 depencency and at that time C# did not have that supported. It came (as far as I remember) after C# 4, which is what Magic supports. That does not mean that you cannot do Multithreading in snippletes. you just cannot do it in a more elegant way. https://docs.microsoft.com/en-au/dotnet/csharp/whats-new/csharp-version-history Reason why Magic has only C# 4 supported is I think a license problem. My experiments with asynchronos stuff in Magic C# were, well, I dont remember ^^. Not so nice I think. Better go integrate with async queues and events. Thats pretty reliable and at least oe person in this group reported "success" re an sample of mine with Magic XPA and Apache MQ (.NET). Best regards, Andreas
|
|
Re: .NET asynchronous methods and functions
Andreas Sedlmeier
On Tue, Feb 18, 2020 at 05:19 PM, Freddy Dewulf wrote:
Is it possible in Magic XPA 3.3 to use async functions in .NET snippets.Could be me and I wrote something re that a while ago either here or somewhere else and async / await is not possible with Magic Snipology because what Magic uses in order to compile the C# has a .NET Framework 2.0 depencency and at that time C# did not have that supported. It came (as far as I remember) after C# 4, which is what Magic supports. That does not mean that you cannot do Multithreading in snippletes. you just cannot do it in a more elegant way. https://docs.microsoft.com/en-au/dotnet/csharp/whats-new/csharp-version-history Reason why Magic has only C# 4 supported is I think a license problem. My experiments with asynchronos stuff in Magic C# were, well, I dont remember ^^. Not so nice I think. Better go integrate with async queues and events. Thats pretty reliable and at least oe person in this group reported "success" re an sample of mine with Magic XPA and Apache MQ (.NET). Best regards, Andreas
|
|
Re: New file uploaded to main@magicu-l.groups.io
Disclaimer: These five programs are not well documented; one isn't even half complete. I apologize, I had forgotten how I had left them when I first put this demo project together, now several years ago. I'll leave the project file posted for now, for whomever may be interested. The Demo_TCPListener program is what Freddy was interested in, but I will replace the whole project as soon as I get a chance to document, tidy-up, and complete them all as needed. TCP/UDP Communications are very useful, and it would appear that implementing a NetworkStream will greatly simplify the interactions in Magic xpa. In other words, stay tuned ... Steve Blank
On 2/18/2020 9:56 AM,
main@magicu-l.groups.io Notification wrote:
|
|
Re: .NET asynchronous methods and functions
Freddy,
I just uploaded a demo v3.3 project containing five demo programs, the first of which illustrates how to set up a TCP Server, wait for a connection and then listen for incoming datagrams. Note that none of these demo programs utilize code snippets – it's all pure Magic. HTH. STeve BLank
|
|
New file uploaded to main@magicu-l.groups.io
main@magicu-l.groups.io Notification <main+notification@...>
Hello, This email message is a notification to let you know that the following files have been uploaded to the Files area of the main@magicu-l.groups.io group. Uploaded By: Steven Blank <sgblank@...> Description: Cheers,
|
|
.NET asynchronous methods and functions
Freddy Dewulf
Hi group,
Is it possible in Magic XPA 3.3 to use async functions in .NET snippets. I don't find how to implement this. Another message mentions that the async stuff of C# is not possible in Magic. Is this still the case? I have to communicate with a payment terminal via sockets (TCP). So I have to send data to the terminal through port 4000. At the other hand, I have to listen to port 4001. The best way to do this is via the async possibilities of .NET I'm looking forward for your responses! Freddy
|
|
Ryan Guedes <ryanguedes2010@...>
Good morning, I'm moving from Online to Rich Client and the functionality of the incremental locate is essential for my application, consulting the magic knowledge center I found this article http://kb.magicsoftware.com/articles/bl_Reference/Incremental-Locate-- -End-User-Capability-xpa that says that the way it works in RIA is different, instead of searching letter by letter it waits for a string to be typed, I want to know if it is possible to control the length of the time interval used to identify if the user has finished typing.
|
|
Windows scaling
Peter Ashworth
Hi All,
With xpa and the environment setting DPIAware = Y, when using windows scaling the text now remains crisp and isnt blury. This has become of some interest as it would let us have our program fill the screen more without having to refactor all of our forms to utilise more space. However a question was raised, can we have the desktop normally at 100% scale, and only scale xpa upwards to either 125% or 150%. From what I've seen whilst looking into this it seems like it might not be possible. The most common scenario in this area is setting a global scale of 150% and then for individual applications disabling the scaling. Which is the reverse of what we are looking for. On https://superuser.com/questions/1069620/enlarge-a-specific-application-in-windows-10 I found a tool called resource hacker but it didnt seem to be able to surface the properties for the mgxparuntime.exe that would let us tweak the scale. Also on https://superuser.com/questions/66101/set-dpi-of-individual-applications-in-windows someone suggested a manifest file approach but when I tried this it didnt seem to do anything. Anyone have any thoughts on this? Thanks Peter
|
|
Re: XPA 3.3g HTTPCall Post - progress but no solution
Andreas Sedlmeier
P.S.: If it is like I suspect and the issue it with the content-type and the message encoding/format then this is not a bug but a "change of behaviour".
Happened in the past that Magic fixed a bug or inconsistency and broke existing code. Not that often because MSE always considered a "change of behaviour" worse than a bug and they would (most of the time not fix the bug therefore but leave it as is, or come up with a Magic Special or so). I do just fear that they do not have the ressources to do it like that anymore but fix bugs as they see them and then have insufficient testing in place in order to see whats the impact on old versions , .... . Im wondering anyway what the point of using Magic Http is ? THey may modernize the underlying libraries, the poor concept of Magic Http functions however remains as is and you are much better of when you /f.i.) use .NET. There's actually samples for that in Online demo because its simply close to undoable to implement more complex protocols (like Oauth2 or so) with Magic Http - which is the reason why MSE does not use Magic Http for this - but .NET instead ... themselve.
|
|
Re: XPA 3.3g HTTPCall Post - progress but no solution
Andreas Sedlmeier
Hi Todd,
On Wed, Feb 12, 2020 at 07:42 PM, Todd Baremore wrote: I wrote a node script to capture what HTTPCall() is sending and found two issuesBetter do what Peter suggests and look what is really going over the wire by using a proxy (like fiddler) or network monitor (like Wireshark). A http proxy is much easier to use and the reason is, that you need to look into http headers as well. So what is the exact Http call you do ? And what do you actually get on server side for http headers and body ? Since ever the default Magic encoding used when you send something but do not specify content type is, I think,. application/x-www-form-urlencoded And it looks a bit as if Magic used that because you forced it to by NOT specifying a content-type. >> XPA 3.3g "message=<message>testing</message>":"" incorrect This is a broken name-value pair for a application/x-www-form-urlencoded message >> XPA 3.2e "message":"<message>testing</message>" correct This is broken/partial JSON because following would be valid JSON ' { "message": "<message>testing</message>" }' If its not JSON what they expact but name=value pairs with (possibly) quoted text in a form encoded message you need to url/formencode the text so correct would be %22message%22%3A%20%22%3Cmessage%3Etesting%3C%2Fmessage%3E%22%0A Now Magic dois not have JSON handling anyway so if you set following header (not both)
All would be OK I guess (all versions) because Magic would not touch the message and consider it to be "binary"If recipient of your message is however a REST API and you do not set Content-Type: application/json The service should reject it with http status 400 (:=bad request) Obviously it doesent. because its a propietary API and the guys who implemented it, did not yet start to think about interopeability and API designs. When they do, they will reject both of your messages since both are malformed. Best regards, Andreas .
|
|
Xpa mobile development (Screen closes when opening the app on a handheld device - Honeywell CN80)
Hello,
I'm a newbie in mobile dev. We've got an existing mobile app that I need to install on a new device with an android version 8.1 (API 27) for a new requesting company. Our current one in the production which seems to be no problem and working perfectly is on android version 23. So what I did after some readings, I installed the platform 27 and build tool 27 on my dev environment and created a new apk file then installed it on the device. APK build is successful as well as the app installation. But upon opening the app on the device, it opens the initial screen (with our logo on it) and then it closes immediately with an error message - "application has stopped". I have little experience on this so I don't know how to move on from here. BTW, The handheld device is quite good in terms of specifications. See below: SYSTEM ARCHITECTURE Processor: 2.2 GHz Qualcomm® Snapdragon™ 660 octa-core Operating System: Android 8, upgradable through Android R Memory: 3 GB/4 GB RAM, 32 GB Flash Camera: 13.0-megapixel color camera with autofocus and advanced software features for better image quality Display: 106.7 mm (4.2 in) FWVGA (854 x 480) bright color LCD with backlight, outdoor viewable, optically bonded to touch panel Help anyone
|
|
Re: XPA 3.3g HTTPCall Post - progress but no solution
Peter Ashworth
Hi Todd
It's entirely possible that Magic has broken something and you might have to submit a support ticket to isolate/sort this. Are you doing something like: HttpCall('POST','http://url.com','message=<message>testing</message>','') ? Its kind of interesting to see the 3.2e convert into a JSON ish fashion. If my above assumption is correct I would have expected the 3.3g result albeit without the ":" at the end. Can you also try catching it in wireshark? Obviously you are seeing a different output between the two versions with the same script catching them so thats not in question. Can you download different 3.3x versions and see if it breaks in a specific version? 3.3e release notes mention some stuff in this area. 141969 If 'Accept-Encoding: gzip, deflate' header is present in the URL, some garbage data was displayed in response to HTTPFramework=DotNet/Soap. 151005 The function HTTPCall() was not working with Digest and Basic Authentication when HTTPFramework=DotNet. 3.3d added support for PATCH verb. So they have certainly been tinkering in this area and its possible they have upset something. I can't really give personal experience with this anymore as we have since offloaded our HttpCall work to an in house dll due to a need for better TLS support as most of our stuff was https and Magic native TLS support wasnt cutting it. I don't know if you try doing a http communication inside a .net snippit in xpa if that has full TLS access or not but if its not a concern then you could always try writing a central program with a .net snippet to handle your http calls from. You could also maybe try the different HTTPFramework types (D is default I think, the other is J) to see if that makes a difference. Also whilst HttpPost is depricated it will still work if thats the verb you are trying to do so it might be worth giving that method a try to see if there is different behaviour. HTH Peter
|
|
Re: Incremental locate (RIA X ONLINE)
#ria
ryanguedes2010@...
Good morning Tim, I'm using the xpa 3.3c.
|
|
Re: Incremental locate (RIA X ONLINE)
#ria
Tim Downie
RIA incremental locate works for us character by character - you just have to keep in mind that now its going over the interent.
What magic version are using using until maybe 3.2 it didnt work very well.
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of ryanguedes2010@... <ryanguedes2010@...>
Sent: Monday, 17 February 2020 1:41 AM To: main@magicu-l.groups.io <main@magicu-l.groups.io> Subject: Re: [magicu-l] Incremental locate (RIA X ONLINE) #ria Hi Tim, thanks for the answer, let me give you some more details, I'm using a view and all indexes are virtual, I did some tests enabling / disabling index optimization and they make a difference but not enough, I know that locate incremental mechanism
is different for RIA and that it expects a string instead of searching for letter by letter, I even hypothesize that the problem is in the time it takes to identify that the user has finished typing and if it were possible to reduce this time would be the
end of my problems, do you think it is possible?
|
|
Darren
Hi Tim,
Thank you for your feedback! Best Regards,
|
|
Re: Incremental locate (RIA X ONLINE)
#ria
ryanguedes2010@...
Hi Tim, thanks for the answer, let me give you some more details, I'm using a view and all indexes are virtual, I did some tests enabling / disabling index optimization and they make a difference but not enough, I know that locate incremental mechanism is different for RIA and that it expects a string instead of searching for letter by letter, I even hypothesize that the problem is in the time it takes to identify that the user has finished typing and if it were possible to reduce this time would be the end of my problems, do you think it is possible?
|
|