java - Android-Permission: Backward compatibility. Give access only to apps which are using old version of my app(new version permission enforced) -


how give access applications using updated application(newer version) permissions enforced.

suppose application name abc , version 0.1

there few applications on device uses service(let xz) offered abc application.

now, company thinks should expose permission use our xz service.

according have enforced permission pq in version 0.2. onwards applications using our service xz, should mention pq permission in manifest file.

but problem is,after upgrade, applications using version 0.1 no longer able use our service.

i know applications using xz service.

how can solve backward compatibility issue ?

i have checked enough on net no luck.

if faced same issue , found solution, please me...

any work around solutions welcome.

how can solve backward compatibility issue ?

contact developers of apps, warn them of impending permission requirement, , encourage them update apps ahead of time.

or, not defend app via permission. if there known finite set of client apps, , using compatible communications mechanism (e.g., aidl-based binding), can use getcallinguid() find out client request, , validate against whitelist of known apps. can check see if public signing key matches expected value, defend against hacked editions of clients.

another possibility have 2 separate service entry points same functionality:

  • the 0.1 version works today, without permission

  • the 0.2 version requires not <uses-permission> element, changing identity of service (e.g., different action string intent used service)

this allows start tightening security without breaking older apps. can offer deprecation window, give time 0.1 clients move 0.2, before removing 0.1 entry point entirely (or, @ least, defending same permission).

most likely, there other patterns — these ones off top of head.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -