# Multiple callbacks on Android

**URL:** <https://community.auth0.com/t/multiple-callbacks-on-android/6464>\
**Category:** Get Help\
**Tags:** android, callbacks, callback-urls\
**Created:** [May 3, 2017, 8:51pm UTC](https://community.auth0.com/t/multiple-callbacks-on-android/6464 "2017-05-03T20:51:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![filipe.ramos](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/filipe.ramos/32/3325_2.png) [@filipe.ramos](https://community.auth0.com/u/filipe.ramos)\
**Post date:** [May 3, 2017, 8:51pm UTC](https://community.auth0.com/t/multiple-callbacks-on-android/6464/1 "2017-05-03T20:51:45Z")

</div>

Is it possible to have two activities each one with a different callback? I tried this on the Android Manifest:

```
<activity
    android:name=".LoginActivity"
    android:launchMode="singleTask">
    <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data
            android:host="@string/auth0_domain"
            android:pathPrefix="/android/it.siwego.clientapp/login/callback"
            android:scheme="https"/>
    </intent-filter>
</activity>

<activity
    android:name=".RegisterActivity"
    android:launchMode="singleTask">
    <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data
            android:host="@string/auth0_domain"
            android:pathPrefix="/android/it.siwego.clientapp/register/callback"
            android:scheme="https"/>
    </intent-filter>
</activity>

```

I wanna be able to use Facebook login/register from both of them, but when I try to do this I get a webpage that says `The url https://siwego.eu.auth0.com/android/it.siwego.clientapp/callback is not on the list of allowed callbacks URLs`. And then the two URLs I added to the Manifest are listed.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [May 23, 2017, 8:10pm UTC](https://community.auth0.com/t/multiple-callbacks-on-android/6464/2 "2017-05-23T20:10:26Z")

</div>

The reason for the error is that you configured two allowed callback URL’s (the login and register one), but the application is still trying to use the default one which is not in the allowed list and so it fails.

By default the Android callback URL will be:

```
{scheme}://{auth0_account_domain}/android/{application_package_name}/callback

```

Given that both the `{auth0_account_domain}` and `{application_package_name}` are static values within the same application the only way to introduce multiple callback URL’s would be to use different schemes.

In conclusion, although you can’t configure the path portion of the callback URL you may consider having different schemes so that you can register different intents. You would then use the `withScheme` [method](https://github.com/auth0/Auth0.Android#a-note-about-app-deep-linking) of the Android SDK to state that you want to use a different scheme depending on the situation.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/multiple-callbacks-on-android/6464/3 "2018-03-02T05:53:40Z")

</div>


