Hello!
I am new into Android developing. I got some experience with WebView, though. I already managed to create a fullscreen WebView with hard coded URL, some features, etc.
What I want to do now is the following:
1) first, the user should get an address field when the app starts where he/she is able to type an own URL
2) then this field should disappear
3) after that WebView is loaded as usual, but in fullscreen mode without status of the device, etc
I am able to do 3), no problem here. What I don't get is how WebView handles this address field: I already made an application with a static address field and a go button. But this address field is there all the time. If I could fade it out somehow after an user typed the address it would also help, I think.
Hope to hear from you soon!
All the best
Related
I am new to Android development, hence kindly forgive any unintentional mistakes, if made.
I have a native activity rendering using ES2.0. The app needs to start twitter authentication (it uses twitter4j).
I am starting a new activity with twitter auth url. It shows the login page. I give userId, password, the native browser says now it would be redirected to the previous page or something. Then I see a black screen which apparently is the default browser still on top of the application. If I go to home, and background processes, I see my app and the browser as separate activities which makes sense.
Now my question is , how do I code my app to return back to the application once the authentication ends?
Here is the code flow to start the new activity
1. Native code calls JNI function to start authorization
2. The Java function creates an AsyncTask, in doInBackground() it gets the request token using getOAuthRequestToken(URL) where URL = custom url "app1://callback".
3. in onPostExecute() , app starts new intent activity using this code
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(requestToken.getAuthenticationURL()));
BaseGameActivity.startActivity(intent);
Log.debug("authenticate task post ends");
Apple iOS platform default email app will recognize address strings within the text body of an email and make the address string clickable. Options are then given to start Navigation via Apple maps
Trying to re-create that ability on Android. The android gmail app does not seem to auto recognize street address strings.
Any way to turn this on or is there another email app anyone is aware of that has this functionality.
Thanks,
Not sure if I’m on-topic here or not, but here goes... I am responsible for the setup/configuration of WiFi routers in various restaurants and venues. We are simply using the built-in splash page functionality of the router to, upon connection, present a simple marketing message and daily special offer via an extremely simple, static external HTML page, rather than the login page that many venues present (airports, coffee shops, McDonalds, etc.).
After connecting to our SSID with a PC or mobile device, users are presented with a customized splash page where our venue’s latest “offer of the day” banner ad is presented, which links via a standard hyperlink out to a PDF coupon for them to redeem said offer. There are also a couple of other simple items on the page, such as a menu with links to other offers, and an embedded Google Map to the venue in question.
All seems to be OK on PCs and iPad/iPhone devices. However, we are running into a problem on Android devices – specifically, Android devices using newer/more recent versions of the Android OS.
The problem is that Google has made a change to newer versions of Android so that WiFi connection login/splash/confirmation pages no longer come up in the default Web browser of the phone/tablet in question. Instead, they seem to come up in some kind of built-in notification window simply titled “Sign-in to network” – it does not seem to be a full-blown, feature-compliant browser, but rather a panel of sorts built into Android. And when our basic, mainly static HTML page loads within this alert window, none of the standard HTML features (such as hyperlinks) seem to work. A window appears with the title “Sign-in to network”, and our splash page appears on within it, but the standard HTML hyperlink from our special offer graphic (to a PDF file) does not work. Clicking it has no effect. Our menu underneath that does not seem to open (it’s automatically collapsed on mobile devices), and none of the links within it work properly, and our embedded Google Map does not appear at all. It’s as if this alert window or whatever we call it does not support the basic features of HTML pages in any way.
There appears to be no way for me to programmatically force the Android client to “escape” from this proprietary panel and open up a page in their default browser. I’ve tried placing various forms of client and server side “push/redirect” code on the page in an effort to escape from this alert window and cue the default browser to open, with no luck. No matter what I do, it seems that they Android phones always load the splash page within a “sign-in to network” notification page rather than a browser, and that this notification panel is not fully functional for even basic HTML features such as <a> hyperlinks, javascript, or embedded items.
It’s possible that Android’s proprietary “sign-in to network” panel is apparently seeking some sort of acknowledgement of a successful "login" in order to proceed with any subsequent browsing. But if so, I don’t know what constitutes “acknowledgement”. Perhaps there some way to force a hidden form submission or link click programmatically to force the Android device to accept/acknowledge the connection just as if the user had logged in normally, so that we can then proceed to subsequent Web browsing?
Has anyone experienced this problem, or have any ideas as to whether there’s a work-around or coding-based solution to this difficulty?
Thanks very much for your help in advance.
UPDATE: I've been in touch with the Google developers of the sign-in panel... they indicated that "captive portal sign-in pages are displayed in an Android WebView, which uses much of the same code as the Chrome browser. The sign-in app is very simple, you can see all of its source code here.
One second after each navigation (including the initial page load), the app probes to see if the user has successfully signed into the network. This probe is done by fetching a URL that should give back a 204 response."
Based on this, I am making the assumption that until captive portal sign-in app probes to see if the user is successfully signed in, all other navigation and many other features on the page are disabled, and that the full functionality of the WebView panel is restored after a successful sign-in to the network. But if so how can I successfully "signal" to the sign-in app that the user is, in fact, signed in (or rather, that no sign is in necessary or desired)? Is there something programmatically that I can do in the page code to ensure this, so that the viewer can then proceed to normal Web navigation within the panel, and so forth?
Any insight into how this works from anyone here would be greatly appreciated!
Thanks!
Hey everyone, I wanted to get more information on how to create User Login in an app, say I wanted my users to login with there google or Facebook account and me able to upload photos, where would the accounts and photos be stored?
I know obviously on my own servers but could anyone point in the right direction more reading material would be great.
I'm just starting out in Android Dev, I'd like to get more information in creating these types of applications, thanks for your help. Appreciate it.
FNostromo said:
Hey everyone, I wanted to get more information on how to create User Login in an app, say I wanted my users to login with there google or Facebook account and me able to upload photos, where would the accounts and photos be stored?
I know obviously on my own servers but could anyone point in the right direction more reading material would be great.
I'm just starting out in Android Dev, I'd like to get more information in creating these types of applications, thanks for your help. Appreciate it.
Click to expand...
Click to collapse
Their are a few ways to look at it.
1: How is the login suppose to function?
2: Client side or Server side?
3: The main login files are normally stored sever side.
4: What programming language and or crm are you using?
5: What ever your using for the base operation login would be where you will seek the help for that enviroment.
6: If you are logging in to anything.. Then you would go through a program you made or a web page viewed.
7: Are you trying to Api through apps to jack the login information to login to multiple places? Or one place?
8: Your question is good ,but you need to specify exactly what you want to do ,and the outcome.
9: Are you programing an apk app?
10: Are you making a ROM or ?
11: If you want a user to fly across from Google or Facebook then you would basically intercept the Api of the login and act as if your the actual program. That type of thing is Api related.
12: Every program has it's own programming and api calls and functions... Also special folders Vendor specific.....
Sorta like hacking the vendors api...
That would evolve into security protocols being tampered with. That's why they don't give out that information. But you could sniff the packets via a computer and send and receive responses and also do some reverse engineering on the Api.
Deep level stuff.
Not something people will just answer.
The answer is in the question please tell us from beginning to end what it is you want to accomplish.
The problem I am trying to solve:
When I tap on links that are in emails I receive from ebay, then I can only choose in which browser will these links will open and not ebay app itself (which is what I would prefer). Sometimes, instead of a browser opening, gmail app's built-in browser uses the link which automatically transfers me to the app, but that only happens a few times and without me changing any settings (I have only tried changing the WebView Implementation setting from Developer Options (my two options there are Chrome and Android System WebView) but that did not make any difference.
What I want to do:
A possible solution that I have found is an app called Open Link in App (play store link) which, as far as I understand, can be tweaked in order to open specific type of links with specific apps. Some instructions on how this can be done can be found in Github here (this link can also be found in the app's description in play store) but I am not techy enough to follow them. I suppose that the end result after following these instructions would be a modified apk, so could someone please do that for me? If the end result is not an apk but it is still possible for someone to help, that would still be welcome.
Ebay links that are included in the emails start with
Code:
https://rover.ebay.com/rover/
and somewhere in the address they include www.ebay.co.uk or www.ebay.com. Then, when they open in a browser, the address becomes
Code:
https://www.google.com/url?q=https://rover.ebay.com/rover/
and then just https://www.ebay.co.uk/ or https://www.ebay.com/
If you know any other way to achieve what I want, feel free to suggest it (although I have tried many things, including apps like Open Link With... and Better Open With and they did not work)
@k_o_t_s
Re-directing can be managed by editing Android's file /system/etc/hosts
For example, suppose you want to redirect your browser to www.google.com whenever someone types www.facebook.com in the browser address bar, then follows these steps :
Open hosts file.
Find out IP address of www.google.com - IP address is found out to be 74.125.53.100
Start editing at the end of the hosts file : Press Enter to start a new line.
Type 74.125.53.100, press TAB key once followed by facebook.com.
Save the hosts file.
Now whenever you (or someone else) types in your browser’s address bar www.facebook.com, he/she will be redirected to www.google.com. You can follow the same technique on any other websites.
@jwoegerbauer
Thank you for the reply. However, as far as I understand, this is in order to redirect an address to another address (that will still open in a browser). What I want to do is: whenever I tap on a link about an item within an ebay's email, I want ebay APP to open and show the listing of that item.