IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
290 stars 109 forks source link

Opening intel links #297

Closed Gollam closed 4 years ago

Gollam commented 4 years ago

Is it possible to add the intent filters to open intel links, like in the old IITC?

https://github.com/iitc-project/ingress-intel-total-conversion/blob/master/mobile/AndroidManifest.xml#L55

johnd0e commented 4 years ago

Please describe what exact issue do you have with current intel filters.

Gollam commented 4 years ago

Currently, the intent filters defined are for "intel.ingress.com", but many tools still use the old format ("ingress.com/intel") which redirects to the new domain of course, but IITC-CE does not get offered to open those links.

johnd0e commented 4 years ago

Please check https://iitc.modos189.ru/build/test/IITC_Mobile-test.apk

Gollam commented 4 years ago

Strange, because it should've worked like that, but it does not. I'll do some further testing.

Gollam commented 4 years ago

Ok, the problem was that the tool I tested with uses "www.ingress.com/intel" :D That's why it worked with "*.ingress.com/intel". Also, I'd consider filtering for http as well, they will redirect that anyways.

johnd0e commented 4 years ago

New test build pushed. Please confirm which of the following urls opened in app.

  1. https://ingress.com/intel
  2. https://www.ingress.com/intel
  3. ~https://ingress.ingress.com/~ https://intel.ingress.com/
  4. ~https://ingress.ingress.com/intel~ https://intel.ingress.com/intel
Gollam commented 4 years ago

All of them, except the 3rd one of course, because of the prefix. Good enough for me :) Thanks!

johnd0e commented 4 years ago

Well, I meant https://intel.ingress.com/ Please check

Gollam commented 4 years ago

Ok, now I see that you already had an intent filter for that as well, which should match. Strangely, that one still does not seem to work.

johnd0e commented 4 years ago

As per docs 'All the elements contained within the same element contribute to the same filter.'

It's not good at all.

Gollam commented 4 years ago

I tested it some more, and now it does not offer IITC-CE for the 3rd or 4th, but it seems to work for a complete intel link, e.g.: https://intel.ingress.com/intel?ll=46.362646,23.38073&z=17&pll=46.362646,23.38073

So maybe Android does not suggest it everytime?

johnd0e commented 4 years ago

@Gollam 4. should be https://intel.ingress.com/intel

Gollam commented 4 years ago

Yeah, you're right :D Ok, so intel.ingress.com on it's own does not work because that is intended, according to the documentation. I understand now. So the solution is to create separate filters?

johnd0e commented 4 years ago

Test build updated, please check again

Also:

  1. https://ingress.com/abc
  2. https://www.ingress.com/abc
Gollam commented 4 years ago

All 6 is working :)

johnd0e commented 4 years ago

Oops. New build. Check these urls:

1.1. https://ingress.com/intel 1.2. https://www.ingress.com/intel 1.3. https://ingress.com/abc 1.4. https://www.ingress.com/abc 1.5. https://abc.ingress.com/intel 2.1. https://intel.ingress.com/ 2.2. https://intel.ingress.com/intel 2.3. https://abc.ingress.com/

Gollam commented 4 years ago

1.1 works 1.2 works 1.3 doesn't work 1.4 doesn't work 1.5 doesn't work 2.1 works 2.2 works 2.3 doesn't work

MysticJay commented 4 years ago

1.2 should not work either

johnd0e commented 4 years ago

@MysticJay Explain please

johnd0e commented 4 years ago

@Gollam

I'd consider filtering for http as well

Please check in updated build

1.1. http://ingress.com/intel 1.2. http://www.ingress.com/intel 2.1. http://intel.ingress.com/

MysticJay commented 4 years ago

The official intel page is https://intel.ingress.com All other "currently still working" URLs will cause trouble sooner or later as they are redirected at NIA and they will drop that without any prior notice. So if old plugins need adjustment, do so now - instead of continuing to support the depricated schemes.

Gollam commented 4 years ago

@johnd0e all working, thanks @MysticJay what kind of trouble do you think it would cause?

MysticJay commented 4 years ago

e.g redirection loops, new and old tools that continue to use the old schemes or even invent new ones, because "they just work".

We should not support anything that the official page does not generate by it self. The "/intel"-Links are officially only used to share "intel draws" and Map Coordinates

Fix your plugins and tools!

MysticJay commented 4 years ago

After I found about 30 different schemes used in 150 plugins I investigated the situation, because some plugins refused to work after using the official intel-Link. Since then I have been forwarding this on various channels and chats:


@All IITC Developers after reports of malfunctioning plugins, I found that NIA changed the way how URLs get resolved on intel.ingress.com and they also changed the MAP-Link on www.ingress.com to now use https://intel.ingress.com. Additionally they are now using some paths which are not covered by the current URL-scheme. While the old style with an appended /intel* still works, it does not cover those paths that are already in use. Also NIA might remove this "redirection" in future.

I conferenced with some others and this is the conclusion:

To cover the changed MAP-Link, and the changed url-scheme we recommend to remove all @match and @include lines and replace by only // @match https://intel.ingress.com/ Sidenote 1 : a simple @match statement is sufficent, an additional @include is not needed Sidenote 2 : /missions/ will be covered by the above statement as well, so these lines can be removed safely too.


Gollam commented 4 years ago

I am convinced BTW, but the bug with the multiple data nodes still need to be fixed.