Android - Get app package name from app(3rd party) which start my app activity -


guys need on :(

componentname componentname = sharecompat.getcallingactivity(this);


string callingpackage = sharecompat.getcallingpackage(this);

i can app package name above code, if app (com.demo.app.a) startactivityforresult() app b.

at app b, can : com.demo.app.a

but, if app b() opened google chrome browser(from intent action.view scheme). let's app support https scheme.

my app b, can't retrieve google chrome browser app package name.

note: google chrome browser example.

baseactivity.this.getreferrer().gethost(), return correct app package name want. available api 22+

any way detect app package name, if app opened 3rd-party app?

thanks guys!

my app b, can't retrieve google chrome browser app package name.

correct. there no requirement app include extra_referrer in intent, , if do, can put fake uri in there.

baseactivity.this.getreferrer().gethost(), return correct app package name want

not necessarily. quoting the documentation: "note not security feature -- can not trust referrer information, applications can spoof it."

any way detect app package name, if app opened 3rd-party app?

no.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -