Author Topic: [APP] - version 3.24.+ ( 31. 5. 2017 )  (Read 12042 times)

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10278
  • Thanked: 92 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #45 on: June 21, 2017, 22:55:47 »
Hello,
hmm damn. Yes there was a change. Google since Android 7 disabled inexact broadcast intents, so now every intent has to be directly send to certain application.

How is your broadcast receiver registered? It's directly in manifest of your app or you use ActionTools.enablePeriodicUpdatesReceiver method over Locus API?
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline zigzag

  • More than Newbie
  • *
  • Posts: 18
  • Thanked: 6 times
    • View Profile
  • Device: Sony Z1 Compact
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #46 on: June 23, 2017, 01:03:10 »
Hello,

I use manifest to start the app with Locus, and it works, because the app start.

Code: [Select]
        <receiver
            android:name=".PeriodicUpdateReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="locus.api.android.ACTION_PERIODIC_UPDATE" />
            </intent-filter>
        </receiver>

I use a new receiver in running app, while it running. It not receive data.

Code: [Select]
        receiver = new BroadcastReceiver() {

            @Override
            public void onReceive(Context context, Intent intent) {
                Log.d("Most jött", "adat a locustól");
                try {
                    // Értelmes adat érkezett-e be?
                    if (intent == null || intent.getAction() == null) {
                        return;
                    }


                    if (!isLocusRunning(context)) {
                        return;
                    }

                    // Beolvassa a kapott adatokat
                    PeriodicUpdatesHandler.getInstance().onReceive(appContext, intent, updateHandler);
                } catch (Exception e) {
                    return;
                }
            }
        };

        IntentFilter filter = new IntentFilter(
                LocusConst.ACTION_PERIODIC_UPDATE);
        registerReceiver(receiver, filter);

    private PeriodicUpdatesHandler.OnUpdate updateHandler = new PeriodicUpdatesHandler.OnUpdate() {
        /*
         * Locustól kapott adatok beolvasásának a függvénye
         */

        @Override
        public void onUpdate(LocusUtils.LocusVersion locusVersion, UpdateContainer update) {
            lastUpdate = update;
            updatee(false);
            Log.d("Most jött", "adat a locustól");
        }

        @Override
        public void onIncorrectData() {
        }
    };
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10278
  • Thanked: 92 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #47 on: June 23, 2017, 07:11:23 »
Hello,
ah here probably comes a problem.
It is not possible to correctly register receiver for updates without letting know Locus Map that something like happen.

For cases, you wants to register receiver dynamically, it is necessary to ActionTools.refreshPeriodicUpdateListeners method . It is private now, so I'll make it public to next API version.

Second method I recommend is to use registered, but disabled, receiver in manifest

Code: [Select]
        <receiver
            android:name=".PeriodicUpdatesReceiver"
            android:enabled="false">

            <intent-filter>
                <action
                    android:name="locus.api.android.ACTION_PERIODIC_UPDATE" />
            </intent-filter>
        </receiver>

And enable/disable it with
Code: [Select]
ActionTools.enablePeriodicUpdatesReceiver or similar
Code: [Select]
ActionTools.disablePeriodicUpdatesReceiver.

I'll also try to add some "automatic refresh" into Locus Map to next version. Let me anyway know if this helped.

EDIT: back, I knew that "private" for refresh has some reason.

https://stackoverflow.com/questions/3862207/querybroadcastreceivers-does-not-find-receivers-registered-with-registerreceiver

So only possible method how to make this all work, is to have receiver registered in manifest!! And enable/disable it on runtime as I mentioned in second method. I'm sure if this will be fixed in your app, it will work correctly. I have to fix this stupid issue in manual as well , sorry my bad.
« Last Edit: June 23, 2017, 07:24:17 by menion »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline zigzag

  • More than Newbie
  • *
  • Posts: 18
  • Thanked: 6 times
    • View Profile
  • Device: Sony Z1 Compact
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #48 on: June 24, 2017, 09:41:48 »
Thanks for your answer, i fixed the issue.
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10278
  • Thanked: 92 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #49 on: June 24, 2017, 12:01:28 »
Thanks, glad it works. And sorry for a complications. This all was changed because of this "stupid" change in Android 8.0 : https://developer.android.com/preview/features/background-broadcasts.html .
So only solution is not to send general public intent with Periodic updates, but every send intent send directly to application that wants it. And your receiver registered manually at runtime was unfortunately undetectable by Locus Map as I mentioned in the end of my previous post. Thanks for understanding.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Henk van der Spek

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 167
    • View Profile
    • http://www.enduro.nl
  • Device: Ulefone Armor 2 Android 7.0
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #50 on: June 24, 2017, 20:10:12 »
....
@joeloc , @hank : you will see in next version, performance improved

Ok, I had a good field test today with (not beta) version 3.24.2 and I can confirm a significant performance improvement. With track style like arrows, zoomlevel 21 and switching to guidance for a geocache I had no more problems of freezing screen etc.
Oh and zoomlevel 22 killed the arrows track style and switched it automatically to a straight line, which is fine for me. Zooming out reverses that; great extra. Thank you Menion and team.
Ulefone Armor 2 Android 7.0
 

Offline lor74cas

  • More than Newbie
  • *
  • Posts: 95
  • Thanked: 6 times
    • View Profile
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #51 on: June 24, 2017, 20:33:32 »
I can not comment the performances of Locus about style but I noticed a quicker start up with the last version

Inviato dal mio SM-G800F utilizzando Tapatalk

 

Offline Andrew Heard

  • Padavan of Locus
  • ***
  • Posts: 454
  • Thanked: 13 times
    • View Profile
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #52 on: June 25, 2017, 07:57:28 »
I'm being slack. I should add a new help topic as this is not a beta bug, but am on the road, and this is quicker, and a simple bug. In the offline address search, if you paste in an address then edit the string such as backspace, mid string, NOT at the end, the cursor position is lost, and returns to the end of string after each tap. Very easy to reproduce and annoying.
Sony Z1, Samsung Galaxy Note 8
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10278
  • Thanked: 92 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #53 on: June 26, 2017, 07:29:12 »
hi guys, I'm glad you noticed some speed improvements ... they are there :).

@Andrew Heard: thanks, fixed!
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Henk van der Spek

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 167
    • View Profile
    • http://www.enduro.nl
  • Device: Ulefone Armor 2 Android 7.0
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #54 on: June 28, 2017, 19:20:02 »
In 3.24.2 the weather is going funny when I on the couch at home in the Netherlands select Paikuse Estonia. Today is wednesday 19.00 hrs 280617 and the screen shows also yesterday. I know there is a one hour time difference, is that the cause?

Ulefone Armor 2 Android 7.0
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10278
  • Thanked: 92 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #55 on: June 29, 2017, 07:54:23 »
Hello Henk, thanks for a bug report. More complicated then I've expected :). Will be solved in next version.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline john_percy

  • Padavan of Locus
  • ***
  • Posts: 415
  • Thanked: 25 times
    • View Profile
  • Device: MotoG
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #56 on: June 30, 2017, 18:17:59 »
Since the last two (?) releases, the map does not redraw properly on switching themes and requires zoom in and out to redraw correctly.

Sent from my XT1039 using Tapatalk

 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10278
  • Thanked: 92 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #57 on: July 01, 2017, 11:06:25 »
Good day John,
what exactly is "not properly"? Do you see after change of theme black areas or some "loading..." empty map and simple zoom in/out fix it? if yes, then Petr discovered this problem a day or two before and should be fixed in next version. If this is something different, screenshot should be useful here. Thanks!
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1885
  • Thanked: 16 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #58 on: July 01, 2017, 12:05:35 »
If you work on a theme it´s necessary to reload it very often. But after a few times, it seems that Locus load the "cached" theme settings before. So I have to close Locus, than I have to do anything else with the phone to "clear memory" and to restart Locus.
I see this since one year(?) and not only since the last two releases, 
Regards J.
 

Offline john_percy

  • Padavan of Locus
  • ***
  • Posts: 415
  • Thanked: 25 times
    • View Profile
  • Device: MotoG
Re: [APP] - version 3.24.+ ( 31. 5. 2017 )
« Reply #59 on: July 01, 2017, 12:54:10 »
Some black areas, some wireframe drawing (lines very thin, no fills). Simple zoom in/out fixes it.

what exactly is "not properly"? Do you see after change of theme black areas or some "loading..." empty map and simple zoom in/out fix it? if yes, then Petr discovered this problem a day or two before and should be fixed in next version. If this is something different, screenshot should be useful here. Thanks!