Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't work on android #20

Open
MaximeLimone opened this issue May 31, 2016 · 5 comments
Open

Don't work on android #20

MaximeLimone opened this issue May 31, 2016 · 5 comments

Comments

@MaximeLimone
Copy link

Hello,

Your work is fabulous !!! But it don't work on android for me, weupnp never find the gateway... Moto X Pure - Android 6.0

@a-pavlov
Copy link

Hi,
I had similar problem and after add printing stack traces found out it related to:
From adb output:
Can't create default XMLReader; is system property org.xml.sax.driver set?
To fix you have to explicitly create factory:
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); SAXParser newSAXParser = saxParserFactory.newSAXParser(); XMLReader parser = newSAXParser.getXMLReader();
Instead of
XMLReader parser = XMLReaderFactory.createXMLReader();
Will prepare fix soon.

@abahgat
Copy link
Member

abahgat commented Oct 12, 2016

Thank you @a-pavlov!
Can you confirm the fix will work also on non-android systems?

@a-pavlov
Copy link

Hi @abahgat ,
it definitely works on Windows. I've created pull request with fix.

@ghost
Copy link

ghost commented Mar 11, 2017

Hi,
you should specify the Sax driver by using:

System.setProperty("org.xml.sax.driver", "org.xmlpull.v1.sax2.Driver");

this way it is working with no modification to the original code.
Thanks.

@frikksol
Copy link

I can confirm that the fix by @ghost works on Android. I have not tested on other systems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants