• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

How can i update my app on play store?

Community Beginner ,
Nov 29, 2016 Nov 29, 2016

Copy link to clipboard

Copied

I have an app that provide football predictions every day and i was wondering if i have to publish the new apk to play store every day.

I have study other predictions apps and i see that the last update was before 1 or 2 months but they predictions are uptodate.

I use animate cc and every day i have to write my new predictions , publish my app with a new version bigger than the old and upload my apk to playstore.

Is this ok?

The problem that i have is that the clients must go to play store and update the app every day to see the daily predictions.

Views

541

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 30, 2016 Nov 30, 2016

Try this code in a new AS3 FLA, to get the general idea of how to retrieve text from a file that is online somewhere. Then, think about how you would structure the text so that you can easily extract information to update your app, and change the example URL I used to the URL of your own text file (which you will upload to the server using FTP):

import flash.net.URLLoader;

import flash.net.URLRequest;

import flash.events.Event;

var req:URLRequest = new URLRequest("http://txt2html.sourceforge.net/sample.txt

...

Votes

Translate

Translate
LEGEND ,
Nov 29, 2016 Nov 29, 2016

Copy link to clipboard

Copied

An easy solution would be to have a text file that your app reads in, that has the data needed for the predictions. Then you would put that text file online somewhere, and the app would read the file from its URL. You could easily replace the file to make the predictions be up to date.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 30, 2016 Nov 30, 2016

Copy link to clipboard

Copied

Ok , this is a correct answer!

Any ideas how i can make this answer to work?

Where can i upload the text file?

How can i call it from my app and open it in a frame in my app?

So Mr Preran​ i believe correct answers must give from the person have the questions !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 30, 2016 Nov 30, 2016

Copy link to clipboard

Copied

Correct answers are best when the person who asks the question selects that. But also, moderators can decide to do that, so that anyone else later on can see that the topic has an answer. Moderators can also unmark a correct answer, which I will do! Then I'll post another answer, which you might like more.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 30, 2016 Nov 30, 2016

Copy link to clipboard

Copied

Try this code in a new AS3 FLA, to get the general idea of how to retrieve text from a file that is online somewhere. Then, think about how you would structure the text so that you can easily extract information to update your app, and change the example URL I used to the URL of your own text file (which you will upload to the server using FTP):

import flash.net.URLLoader;

import flash.net.URLRequest;

import flash.events.Event;

var req:URLRequest = new URLRequest("http://txt2html.sourceforge.net/sample.txt");

var ldr:URLLoader = new URLLoader();

ldr.addEventListener(Event.COMPLETE,loaded);

ldr.load(req);

function loaded(e:Event){

  trace(e.target.data);

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

I build a webpage on 000webhosting and i call the page with the predictions with this code:

var swv:StageWebView = new StageWebView();

swv.stage = stage;

swv.viewPort = new Rectangle(0, 250, 440, 400);

swv.loadURL('https://sirmobilegames.000webhostapp.com/');

The page open in the application in the frame where the code is.

I try your example and its work, but with my way is that i want!

Thank you for your help very match!

I was wondering if there is any chance when the page open in the mobile, to save the page so the second time

the user open my app to not need to have internet connection!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

There is a slight chance that Apple may not approve your app, because it will be clear to them that you could easily completely change the content of the page after the app has been approved. But maybe they won't, seeing as there are various ways to get around their limitations.

I can't spend the amount of time to show you all of the code you'll need to do, but these would roughly be the steps (two different approaches):

1. Where you only update files that are changed

In your app bundle you would have a copy of the web page files. When the app is first run you would copy those files into the app's document folder.

One of the files would be a list of all of the other files, and what their last modified date is.

You then read the same file from the online page, in the way I was telling you before. Then you go through each line in the file to see if any of the files have been updated.

You would download any new files and write over the local copy that is in the app documents folder.

At the end you show the local copy of the page. Also, if when you start the app you can see that the user is offline you would immediately show the local copy.

2. Where you always copy everything

First part would be the same, you would create a copy of the files for the web page in the app's documents folder, only this time do it by extracting a zip file.

Then each time the user looks at that page you check to see if an online version of the zip file has been updated, and if it has you download and extract all of the files again, replacing the local copy.

If you do use the zip file approach you should look at this ANE: http://www.myflashlabs.com/product/zip-ane-adobe-air-native-extension/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

LATEST

i appreciate your help!

Thank you very match Mr. Colin!!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines