Code Monkey home page Code Monkey logo

Comments (16)

michaeltintiuc avatar michaeltintiuc commented on August 10, 2024 2

Looks like it could be anything, I had it set to foo and oauth no difference whatsoever

from generic-oauth2.

michaeltintiuc avatar michaeltintiuc commented on August 10, 2024 1

I was able to fix this by adding android:host here:

            <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:scheme="@string/custom_url_scheme" android:host="@string/custom_host" />
            </intent-filter>

from generic-oauth2.

loonix avatar loonix commented on August 10, 2024 1

Thanks bro, will give it a shot

from generic-oauth2.

moberwasserlechner avatar moberwasserlechner commented on August 10, 2024

Hi,

I experience the same behavior but only on simulator and while debugging on a device. In a production build the dialog is not displayed but users reported some weird problems.

Unfortunately I have no idea where this comes from. So if you have any logs or find anything please let me know so I can tackle the problem.

BR, Michael

from generic-oauth2.

jbrown0824 avatar jbrown0824 commented on August 10, 2024

@moberwasserlechner I just tried installing it on a real device and am experiencing the same issue. I'm not very experienced with native android development (yet). Could you point me in a direction to find some logs that we can look through to try and diagnose the issue?

from generic-oauth2.

moberwasserlechner avatar moberwasserlechner commented on August 10, 2024

Only if you release it in the Playstore the issue should be gone.

If you don't have any logs it's ok. I will try to find the bug myself but after the holidays ;)

from generic-oauth2.

moberwasserlechner avatar moberwasserlechner commented on August 10, 2024

I think the schemes in the gradle file and the a scheme in a intent filter in the androidManifest.xml

build.gradle

android.defaultConfig.manifestPlaceholders = [
  'appAuthRedirectScheme': 'com.company.product'
]

are conflicting each other.

AndroidManifest.xml ... @string/custom_url_scheme

<activity
      android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
      android:name="com.byteowls.teamconductor.MainActivity"
      android:label="@string/title_activity_main"
      android:theme="@style/AppTheme.NoActionBarLaunch">

      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>

      <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:scheme="@string/custom_url_scheme" />
      </intent-filter>

    </activity>

I have no solution yet but you might try to change on or the other.

from generic-oauth2.

michaeltintiuc avatar michaeltintiuc commented on August 10, 2024

I have stumbled upon the same issue, will see if doing above will solve anything

from generic-oauth2.

mraible avatar mraible commented on August 10, 2024

from generic-oauth2.

moberwasserlechner avatar moberwasserlechner commented on August 10, 2024

@michaeltintiuc cool. What value has @string/custom_host? Is it the same as @string/custom_url_scheme?
thx

from generic-oauth2.

moberwasserlechner avatar moberwasserlechner commented on August 10, 2024

I just tried it (foo ;)) and it works. Will add this to the docs. Great find.

from generic-oauth2.

moberwasserlechner avatar moberwasserlechner commented on August 10, 2024

Added a section formulated by @rgolea

from generic-oauth2.

loonix avatar loonix commented on August 10, 2024

Hi Guys, I keep getting this on debug and release versions, does any of you know what can be done to fix this? I have followed the steps that were added to the documentation.

from generic-oauth2.

mdenieffe avatar mdenieffe commented on August 10, 2024

@loonix I'm having the same issue on the emulator where it's displaying a duplicate app to return control to, (I haven't tested the release version) but I seemed to have gotten around it with the following configuration

build.gradle

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    defaultConfig {
        applicationId "your-app"
       ...
        manifestPlaceholders = ['appAuthRedirectScheme': 'your-scheme']
    }
    ...
}

strings.xml

<?xml version='1.0' encoding='utf-8'?>
<resources>
    ...
    <string name="custom_url_scheme">your-scheme</string>
</resources>

AndroidManifest.xml

    <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:scheme="none" />  <!-- might not be needed?? -->
    </intent-filter>

I'm not an Android developer so I can't explain why this configuration is working for me, but it might be of help.

Thanks.

from generic-oauth2.

marianapatcosta avatar marianapatcosta commented on August 10, 2024

Hi. I'm using this plugin in my ionic/capacitor project and follow the setup described for Android. Everything was working great using the emulator but when I installed the .apk in my android device, the app launch icon was not on the screen, though the installation was successful and the app was listed in installed apps. After some try/error attemptives, I figured out that if I removed the fix for this issue ( <data android:scheme="@string/custom_url_scheme" android:host="oauth" /> in AndroidManifest.xml), I was able to run the app in the device, as expected. Do you know why is this happening? Also, with or without the fix, I did not experience the bug reported in this issue.
Thanks.

from generic-oauth2.

moberwasserlechner avatar moberwasserlechner commented on August 10, 2024

Hi @marianapatcosta,

you wrote:

Also, with or without the fix, I did not experience the bug reported in this issue.

You did not experience this issue. Could you please create a new issue, describing your problem and giving the information asked by the issue template.

Thx & BR

from generic-oauth2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.