View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000374 | MantisDroid | Task | public | 2012-10-11 09:53 | 2012-10-22 22:00 |
Reporter | e7andy | Assigned To | e7andy | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 1.1 | Fixed in Version | 1.1 | ||
Summary | 0000374: Add scan QR code button on login screen | ||||
Description | Add scan QR code button on login screen. Check that scanned QR code is correct with regex and then create java.net.URL to check that it is formatted correctly: Regex: (?i)^mantisdroid://(.*) Java code: ------------------- // Set values from Url Uri data = getIntent().getData(); //TODO: Test scanning wrong QR codes and handle exceptions that occur. if(data.getQuery() != null) { Log.d("UrlLoginActivity", data.getQuery()); } String regex = "(?i)^mantisdroid://(.*)"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(data.toString()); if(m.matches()) { try { URL url = new URL(m.group(1)); } catch (MalformedURLException e) { Intent loginIntent = new Intent(this, LoginActivity.class); loginIntent.putExtra(MantisDroid.,true); startActivity(loginIntent); this.finish(); } ------------------- | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-10-11 09:53 | e7andy | New Issue | |
2012-10-11 10:01 | e7andy | Status | new => confirmed |
2012-10-11 10:01 | e7andy | Target Version | => 1.1 |
2012-10-21 12:30 | e7andy | Assigned To | => e7andy |
2012-10-21 12:30 | e7andy | Status | confirmed => assigned |
2012-10-22 10:06 | e7andy | Summary | Add scan bar code button on login screen => Add scan QR code button on login screen |
2012-10-22 10:06 | e7andy | Description Updated | |
2012-10-22 10:10 | e7andy | Description Updated | |
2012-10-22 10:15 | e7andy | Description Updated | |
2012-10-22 10:21 | e7andy | Description Updated | |
2012-10-22 11:15 | e7andy | Description Updated | |
2012-10-22 21:59 | e7andy | Description Updated | |
2012-10-22 22:00 | e7andy | Status | assigned => closed |
2012-10-22 22:00 | e7andy | Resolution | open => fixed |
2012-10-22 22:00 | e7andy | Fixed in Version | => 1.1 |