-
Notifications
You must be signed in to change notification settings - Fork 75
User can't login if there is a default application for github url #132
Comments
NO! I used webviews before, and had several problems with that. Maybe, a better aproach, is creating a custom intent, deleting other applications like forkhub, octodroid, or modernhub) |
Ok, so you think it will be better to simply exclude applications by their names? |
No by their names... Maybe, a better aproach, is get the apps that can receive github.com and remove them :D |
Remove them from phone?) How? |
nooo XD From intent. |
Aha, i agree, i meant it when i said "by names". |
ok :D |
I think, it will be better to make it vice versa, like there, find user browsers like that: Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://someurl.com"));
List<ResolveInfo> list = context.getPackageManager().queryIntentActivities(i, 0); And then use them to limit intent like that: Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
ComponentName comp = new ComponentName("com.android.browser", "com.android.browser.BrowserActivity");
i.setComponent(comp); What do you think? |
Uhm... As an example, i use Lolipop in Nexus 5, native one, so i don't have the default android browser. Quering for any url is not good, because we want to know which apps are filtering github.com You tried that? Intent intercept ? With this one, you can se how intent is launched, and make the correct filter on Intent. I did something similar in Interceptor.class (under activites) to re-send the intent that App cannot match |
I meant, that there: ComponentName comp = new ComponentName("com.android.browser", "com.android.browser.BrowserActivity"); Should be all users browser, which we can get by this command: Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://someurl.com"));
List<ResolveInfo> list = context.getPackageManager().queryIntentActivities(i, 0); |
Uhmm ok But, why not query for http://github.com, and then filter by apps that are browsers? hen, show a custom Dialog to be redirected to, not let system do the work? |
In this case we should always had an actual browser list. I want to use custom url to get all browsers list. |
Ok, settings the component name seems to be the best option. Try that! :D |
Closed by PR |
Now when user is trying to log in, application creates an implicit intent to redirect user to github url, but if there is any application that processes all github url intents (for example forkhub) he will fail to login.
I think it will be better to use WebView instead of implicit intent.
The text was updated successfully, but these errors were encountered: