I am creating an Android App using MvvmCross.
Before calling some service,I want my MvxActivity should first check app's isolated
storage whether that data is present in its isolatedStorage, if it is then it should
populate its UI controls(eg. ListView,Spinner etc.)by fetching data from
isojatedstorage otherwise call service and then populate them using data received from service.
How can i achieve this?
You can use File plugin for MvvmCross
https://github.com/MvvmCross/MvvmCross/wiki/MvvmCross-plugins#file
Another option is to use that plugin for Android (i didnt dig to deep inside), but for Windows Phone i had used this solution for downloading/storing images and here is my own lib for storing any text data in the isostorage (serialization/deserailzation is included).
I use PCLStorage, it's cross platform. Just search for it on NuGet.
Related
I want to transfer information from my website to my electron program by using a link that has some data in it (like myprogram://data). But can't seem to find any info on the internet about this. Any help would be gladly appreciated.
Thanks!
You need to register your app as a protocol handler using app.setAsDefaultProtocolClient
app.setAsDefaultProtocolClient("myprogram")
On Windows, when the "myprogram://data" link is clicked, a new instance of your application will be launched and the arguments will be included in process.argv
Use app.requestSingleInstanceLock if you don't want multiple instances of your app to be running
On macOS, you can get the arguments using the open-url event
I have my angular universal app running well. But few of the libraries which I use, internally uses localStorage to set and get data. I can neither omit the libraries nor change it. Being said that, is there a workaround where I can use localStorage in server side.
Try to use
node-localstorage npm module to use localStorage at the nodejs server side.
I wanted my Grails 3.1.5 app to serve both JSON data using the *.gson format AND, for some pages/URLs I wanted to continue to use GSPs.
I built an app using the rest-api profile.
Then I copied over controllers and views from an other app that I'd built using the web-api.
In doing so, and to be consistent, I also moved index.gson to a different location.
Now I get a:
Could not resolve view with name 'index' in servlet with name 'grailsDispatcherServlet'
Started digging into the viewResolvers that are available in the 3.1.5 code base. It is possible that the rest-api profile configures a viewResolver to look for *.gson files in a certain location.
Is there anyway to configure maybe a CompositeViewResolver that looks for both the views, *.gson and *.gsps?
If so, how can I do this?
Thanks!
I've managed to resolve this issue by adding this plugin to build.gradle:
compile 'org.grails:grails-plugin-gsp'
and with both
profile 'org.grails.profiles:web'
profile 'org.grails.profiles:rest-api'
and apply plugins
apply plugin: 'org.grails.grails-web'
apply plugin: 'org.grails.grails-gsp'
apply plugin: 'org.grails.plugins.views-json'
Apparently, they remove it when you're using REST profile, to reduce overhead, as you rarely render HTML on REST service side.
We are building a web application using SVG & JS. The log file for this application needs to be created on the client side and then finally uploaded to the server once the project is ended.
As we donot wish to go near ActiveX controls, is it possible to achieve this with the new HTML5 'Local Storage'? Isnt that what 'Local Storage' is for anyways?
Is there a working example of this as well?
Many thanks,
Not really sure what you mean by this but there is something out there called jStorage.
It uses javascript and json to save data to the local database.
I'm writing what is essentially a browser in Adobe AIR (ActionScript, not AJAX). A great bit of functionality to implement would be protocol handling. iTunes, for instance, handles itms protocols; when your friend sends you a link beginning with "itms://", it's going to launch iTunes as long as it's installed. Is there a way to write an AIR app (requiring AIR 2 would be fine) that can be the "handler" for a protocol in this way?
There is no way, programatically speaking, to specifically handle a particular protocol. However, there is InvokeEvent. InvokeEvent will be fired when the application is "invoked", either when it's explictly launched or if an associated file or URL is activated.
The process of associating your app with a particular file type or protocol scheme is separate and application-dependant. In iOS, for example, you would need to specify the protocol in Info.plist under CFBundleURLTypes/CFBundleURLSchemes.
Yes. You can use the URLLoader class to download data in binary form (URLLoader.BINARY) and then parse this as appropriate. See this CS3 documentation on working with external data.
http://www.patrick-heinzelmann.de/labs/lastfm/
I'm not sure exactly how it works and I don't see a way to download the app, so I can't even test it, but maybe it will help...
Check out this page. I am trying to find out the same thing, but I haven't found any solution to do it with just Air yet. Seems like you might need a custom installer to setup the correct registry entries, and a proxy application to "wash" the input to a correct format that then can start your application with the correct command line parameters. Hope this can be of any assistance.