Force Update application by using custom api in flutter - json

I am getting sick of thinking about how to make application force update by controlling the json api. I want to call json api from my server and want to make your if the app is need to update and show the message box and navigate to this update application. Please share me a sample if you know how to do it in flutter. I really appreciate.

In one of my previous jobs, I was asked to add a force update function to the app. I personally don't like it when apps force update you (except when you are in a really old-old version).
This is how I did it (i am not going to paste the code, I am going to simply explain it) when the app started up we had a function that checked an API for the latest version of the app (that app worked only with internet access). If the API returned a newer version we simply displayed a msg informing the user that there is a newer version. If the API had the forceupdate value, I was displaying a msg and disabling everything. The user couldn't perform anything in the app until he updated it to the latest version.

Related

Azure APIM Fails to Create API from Function App

When I try to create an API in APIM by using Create from Function App, I fill out the fields and click Create. The operation provides the wait dots and comes back in five seconds and says
Could not create an API. Please try again later.
I can create a blank API...but not one from an existing Function App. I have tried multiple combinations, No products, all products, no version, version..etc. No luck.
Thoughts?
Notes
The function in question is an HTTP Trigger.
The function works locally on my development box and in Azure.
APIM Tier is Developer
On that Function app, during Publish in Visual Studio I have reported that attempting to manage application settings before a publish fails and in trying to add a new one causes Visual Studio to unexpectedly close. Manage Application Settings on Publish Related, don't know.
Just a Ctrl + F5 solved the problem for me. Try it! ;)
I just ran into the same issue because I used Linux (Preview) instead of Windows. When I blew away the Function App and recreated a new one with Windows, my API Manager was able to create an API off it.
I have reproduce the same scenario. It is working for me. May I know, below details,
01.Hope you have tested your function and it is working fine.
02.What is the type of the function ? Hope that is "Http trigger" ?
03.What is you APIM tier ? (eg : development, basic etc.)
At this time the solution for me was to use Microsoft Edge instead of Chrome.
It seems Microsoft Azure portal is not working properly in Chrome and I noticed issues in several places. Parts of pages are not rendered at all and sometimes even errors like this pop up just because of the browser.
I had this same problem.
The fix was both simple and unexpected.
When importing the function app, simply enter "/" in the API URL Suffix field.
For me this changed the BaseURL field value. Originally it was just the host, ie http://hostname/. It then appended the endpoint the hostname, http://hostname/endpoint
This is done on the "Create Function from App" modal.
I had the same problem when trying to publish my Azure Functions application with several HTTP triggered functions through API Management running on Consumption plan. The plan did not have anything to do with the problem though.
What I did not realize was that my function app was not working properly when browsing it from the Azure portal. I had some configuration errors that prevented the app to work properly. When I resolved those, I succeeded to publish the application through APIM.
So, check that your application is working properly by browsing to it if you run into the problem described in this thread.
I had temporarily suspended (or stopped) my Function App. Restarting it resolved the problem.
I hope Azure could improve the error message, at least from UX perspective.
The issue was that the function did not actually work.
The Browse button that redirects to the page with the light bulb and the text Your function app version X is up and running did show, but the function still didn't work.
The function error had to be fixed before when importing to the APIM was done.

Tail like logging window for my web app?

I am developing an app using Phalcon and would like to create a popup logging window that displays any logging type information when I am logged in (such as DB calls and exceptions).
Alot of my app is driven by Ajax calls. Is it going to be possible to have a window that I can popup on my main app that uses a tail like method of displaying this information?
How would I go about this? I'm not entirely sure that what I want is possible with the Ajax calls as they are done in a different request. I can't find anything on the internet as to how I would go about this so any help would be great.
Well, you didn't said that explicitly, but I imagine that you want this just for development purposes. If so, you can log useful info to a method that checks if it should send that log to the browser based on some criteria (e.g. logged in user is you, the app is in a dev enviroment, etc) and then use Phalcon's FirePHP log adapter to send to log the information to the browser.
You'll just need to have some FirePHP extension in your Firefox or Chrome to be able to see the information under your JavaScript console. And yes, it works well with Ajax calls too.
Let me know if you need further explanations on this...
I think you are looking for a debug toolkit.. There are lot of toolkit available on packagist.org and phalconist.com. I personally like this phalcon-debug-widget toolkit that you may try.

Is it programmatically possible to update a windows store apps from within the app?

Is there an API that allows to me to programmatically pull the latest update from the store and refresh the current version that the user is using? If not, is it possible for the current app to programmatically know that there is a new version available?
Any samples/examples would be highly appreciated.
You can't programmatically install any Store software. But you can programmatically open the Store to let it do the user manually.
That said, there's no official Store API which you could ask about app versions (you might be able to parse the Store's HTML pages, but I recommend against this approach).
What you can do: Put a small XML file on your website which contains the latest app version number. Your app then can read this file and compare this desired version against the running app's version. If the app is outdated, the app can show a message box to the user.
I ended up using WNS and Azure Notification Hub to send a push notification to the app when it is launched. The notification is in the form of a toast message that essentially states that a new release is available. But if you updated/downloaded the app after xx/xx/xxxx, no updates are necessary.
I know it is a little cludgy but at least the users now know that the version of the app that they are using may be dated. I control the notification through Azure Mobile Service (which is free for up to 10 apps) and can fully modify the actual script.

Box SDK Api to Delete (all but current versions) of a file

I basically want to delete all versions except for the currently designated version of the file.
For that I am using
BoxClient.getFilesManager().getFileVersions(_fileId, reqObj);
The first entry in the returned List<BoxFileVersion> object is the current version.
There doesn't seem to be any API in the Box SDK (for Java) to delete a version - is this being planned soon ?
Is there a better way ?
The SDK is open-sourced on github. If you feel like it, you can submit a pull request with your change to add in version delete. How to do it is documented in the API documentation.

How to send apprequest using actionscript without FB.ui or PHP?

I am building an App in Flash using graph API, I would like to post a request to increase count next to the app bookmark (as detailed here: http://developers.facebook.com/docs/requests/), all the documentation refer to either:
server-side (PHP SDK) where there is no problem using the 'app secret' to retrieve app_access_token, or
using FB.ui which requires user interaction, which is not what I am trying to do.
Is there a way to send an apprequests (App to User) via JS SDK only?
Could it be that this feature does not work in sandbox mode?
UPDATE: solved. worked it out.
I use the server to retrieve the app_access_token (only for a valid logged in user), once having app_access_token there is no problem using standard api calls from within flash.
UPDATE: solved. worked it out.
I use the server to retrieve the app_access_token (only for a valid logged in user), once having app_access_token there is no problem using standard api calls from within flash.