lazydroid/auto-update-apk-client

I implemented the class but does nothing ....

Closed this issue · 9 comments

Good afternoon, first of all like to apologize for the translation, because I 
used the google translator.
My name is Mark Angelo, I implemented a class autoUpdateAPK in my system, I put 
my file. APK http://www.auto-update-apk.com/ site as required by rule. So it's 
time to upgrade, so cast the log appears below the MESSAGES hugs. Follows the 
code and implemented the logcat.

Log: 
04-24 17:21:06.356: V/AutoUpdateApk(1436): md5sum: 
f7c9b0271c30e1322fe2a00e796349e9
04-24 17:21:06.456: V/AutoUpdateApk(1436): checking if there's update on the 
server
04-24 17:21:07.456: D/dalvikvm(1436): GC_CONCURRENT freed 1601K, 20% free 
7299K/9031K, paused 6ms+8ms
04-24 17:21:08.035: V/AutoUpdateApk(1436): got a reply from update server
04-24 17:21:08.035: V/AutoUpdateApk(1436): no update available
04-24 17:21:08.045: V/AutoUpdateApk(1436): update check finished in 1573ms

Codigo:
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tripagelappinstall);
        btnCheckUpdates = (Button) findViewById(R.id.btnCheckUpdates);
        btnCheckUpdates.setOnClickListener(new OnClickListener() {
            public void onClick(View arg0) {
                aua = new AutoUpdateApk(getApplicationContext());
                aua.addObserver(getInstace());
            }
        });
    }

Original issue reported on code.google.com by marcosan...@tripagel.com.br on 24 Apr 2013 at 5:28

According to the logcat, the AutoUpdateAPK works as intended:

1. it calculates MD5 sum of the current application
2. checks if there's an update on the server
3. receives an answer, that there's no update available

Could you please make sure you did not make any changes in AutoUpdateAPK.java 
file, especially aroung the API_URL, that supposed to be exactly 
"http://www.auto-update-apk.com/check", because I can see some pretty funny 
requests in the log files.

Also, I'd recommend to move "aua = new AutoUpdateApk(getApplicationContext());" 
out of the "onClick()" handler, preferably to the next line after 
"super.onCreate()".

Original comment by lenik.terenin on 24 Apr 2013 at 11:15

[deleted comment]
Good morning, I realized that the only site where the lodge with this new apk 
version 2.1 and 2.0 is installed for testing .. still not sure I'll change the 
files and post the log again. Since ja grateful. I do alterations, I will pass 
the "aua = new AutoUpdateApk (getApplicationContext ());" for the onCreate of 
my main class, because so whenever the User open the app will be checking.

Original comment by marcosan...@tripagel.com.br on 25 Apr 2013 at 12:02

Good day again! I created a subclass that contains the method "AUA = new 
AutoUpdateApk (getApplicationContext ())," in method onCreate (). In the log 
appears only the md5sum: "xxxxx" .... http://www.auto-update-apk.com/ site 
contains the apk file in version 3 - 3.1. Not supposed to download the apk file 
and install again? or class autoUpdateAKP only performs the query version on 
the server? having to redirect the client to the site for the download? or the 
system does this automatically? hugs.

Code:
/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tripagelappinstall);
        Text = "New".toString();

        ApkName = "TripagelAPP.apk";// "Test1.apk";//
                                    // //"DownLoadOnSDcard_01.apk"; //
        AppName = "TripagelAPP";// "Test1"; //

        PackageName = "package:br.tripagel".toString(); // "package:com.Test1".toString();
        urlpath = "https://"
                + "www.dropbox.com/s/55adihh472qxe8l/TripagelAPP.apk";

        tvApkStatus = (TextView) findViewById(R.id.tvApkStatus);
        tvApkStatus.setText(Text + " Apk Download.".toString());

        tvInstallVersion = (TextView) findViewById(R.id.tvInstallVersion);
        String temp = getInstallPackageVersionInfo(AppName.toString());
        tvInstallVersion.setText("" + temp.toString());
        aUa = new AutoUpdateApk(getApplicationContext());
    }

Log: 
04-25 12:38:01.945: I/TripagelAPPActivity - onPause.(700): A 
ACTIVETripagelAPPActivity está sendo Pausada!
04-25 12:38:02.464: I/dalvikvm(700): threadid=3: reacting to signal 3
04-25 12:38:02.504: I/dalvikvm(700): Wrote stack traces to 
'/data/anr/traces.txt'
04-25 12:38:03.015: I/dalvikvm(700): threadid=3: reacting to signal 3
04-25 12:38:03.067: I/dalvikvm(700): Wrote stack traces to 
'/data/anr/traces.txt'
04-25 12:38:03.474: I/dalvikvm(700): threadid=3: reacting to signal 3
04-25 12:38:03.494: I/dalvikvm(700): Wrote stack traces to 
'/data/anr/traces.txt'
04-25 12:38:03.976: I/dalvikvm(700): threadid=3: reacting to signal 3
04-25 12:38:04.075: I/dalvikvm(700): Wrote stack traces to 
'/data/anr/traces.txt'
04-25 12:38:04.194: V/AutoUpdateApk(700): md5sum: 
d3a10c7c393c1c046cd2096cd735fa12
04-25 12:38:04.476: I/dalvikvm(700): threadid=3: reacting to signal 3
04-25 12:38:04.666: I/dalvikvm(700): Wrote stack traces to 
'/data/anr/traces.txt'
04-25 12:38:04.804: D/dalvikvm(700): GC_CONCURRENT freed 1597K, 20% free 
7310K/9031K, paused 3ms+57ms
04-25 12:38:04.985: I/dalvikvm(700): threadid=3: reacting to signal 3
04-25 12:38:05.045: I/dalvikvm(700): Wrote stack traces to 
'/data/anr/traces.txt'
04-25 12:38:05.464: I/TripagelAPPActivity - onStop.(700): A 
ACTIVETripagelAPPActivity está Parando!

Original comment by marcosan...@tripagel.com.br on 25 Apr 2013 at 12:44

Sorry to insist, but I think the more information q best for both ^ ^!
The following log with the implementation of aua.addObserver (this), and public 
void forceAtualizaAPK (View view) {
aUa.checkUpdatesManually ();
}
hugs.

Log;
04-25 12:56:12.346: I/TripagelAPPActivity - onPause.(830): A 
ACTIVETripagelAPPActivity está sendo Pausada!
04-25 12:56:12.855: I/dalvikvm(830): threadid=3: reacting to signal 3
04-25 12:56:12.945: I/dalvikvm(830): Wrote stack traces to 
'/data/anr/traces.txt'
04-25 12:56:13.355: I/dalvikvm(830): threadid=3: reacting to signal 3
04-25 12:56:13.364: I/dalvikvm(830): Wrote stack traces to 
'/data/anr/traces.txt'
04-25 12:56:13.494: V/AutoUpdateApk(830): md5sum: 
e8221f9cd21f9ddc347f3e3460a69631
04-25 12:56:13.865: I/dalvikvm(830): threadid=3: reacting to signal 3
04-25 12:56:13.875: D/dalvikvm(830): GC_CONCURRENT freed 1598K, 19% free 
7330K/9031K, paused 3ms+9ms
04-25 12:56:13.995: I/dalvikvm(830): Wrote stack traces to 
'/data/anr/traces.txt'
04-25 12:56:14.444: I/TripagelAPPActivity - onStop.(830): A 
ACTIVETripagelAPPActivity está Parando!
04-25 12:56:28.725: V/AutoUpdateApk(830): checking if there's update on the 
server
04-25 12:56:29.454: V/AutoUpdateApk(830): got a reply from update server
04-25 12:56:30.094: V/AutoUpdateApk(830): got a package from update server
04-25 12:56:33.765: I/AutoUpdateApkActivity(830): Have just received update!
04-25 12:56:33.765: V/AutoUpdateApk(830): update check finished in 5036ms
04-25 12:56:33.865: V/AutoUpdateApk(830): md5sum: 
18c5ca54ed20b4e63ced3452b949078f
04-25 12:56:33.885: I/AutoUpdateApkActivity(830): There's an update available!

Original comment by marcosan...@tripagel.com.br on 25 Apr 2013 at 1:07

My friend forgets all ... worked .. I can not believe .. you're the man! thank 
you ... Anything you need can count on me ... like to keep in touch with you, 
if it is not encomodo! hugs my friend ..... You IS THE FACE!

Original comment by marcosan...@tripagel.com.br on 25 Apr 2013 at 1:26

Glad you've sorted things out! =)

Original comment by lenik.terenin on 25 Apr 2013 at 2:43

  • Changed state: Done
marcosan...@tripagel.com.br
How did you solve this issue? Can you please explain? Did you first download it 
to your own device and then did the update?

Original comment by carolwhi...@gmail.com on 10 Jun 2013 at 8:15

Hi, I actually posted this in despair doubt here, when I just had to follow the 
steps given on the website (http://code.google.com/p/auto-update-apk-client/) 
and just download the file APK first trough an email, sdcarde or something, 
without being at eclipse or Netbeans. hugs.

Original comment by marcosan...@tripagel.com.br on 10 Jun 2013 at 8:53