Comments (20)
Ya, this is a known issue -- I've asked our designer for another version of the dialogs that will work on small screens (and to simplify the existing dialogs), but there is no ETA.
from facebook-android-sdk.
Hi, I got the same problem trying to login from an HTC Tattoo. The screen is too small. Is this an issue with the web page coming from Facebook? I tried changing the portrait size in the SDK code and/or setting display=wap instead. Nothing helped to fully fix the problem. display=wap made the buttons visible but the login was run in the web browser...
from facebook-android-sdk.
The issue is actually that the javascript run in the webview asks the phone browser for screen dimensions. The phone browser reports its actual size (full size including the status bar) and then the javascript sizes itself accordingly.
It's not a problem for larger screens as there is slack enough for the items to fit anyway. Thus, the hardcoded values in the dialog have zero effect on the size on screen.
from facebook-android-sdk.
After some testing I ended up commenting out the line setLayoutParams(FILL) call in setUpWebView(). Now the buttons are shown on an HTC Tattoo with small screen. It is not nice, but it works for now. Time to release our app :-)
from facebook-android-sdk.
If you migrate your app to the new data permissions, then you should find a much nicer login flow that works on a smaller screen.
from facebook-android-sdk.
What is involved in migrating to the new data permissions? Can you provide a link or an example?
from facebook-android-sdk.
No, that does not help. I'm using the new data permissions already.
from facebook-android-sdk.
This issue is solved after the server-side update.
from facebook-android-sdk.
Server-side update = changes on the facebook.com side?
from facebook-android-sdk.
It is still an issue for us. We are getting reports from customers on phones like the Tattoo and X10 mini. The issue for us is not the sign-in dialog (which now looks really ugly), but the permissions dialog.
We are using the new permissions and are asking for "publish_stream" and "offline_access". The permissions dialog doesn't have enough room to show the "Don't Allow" and "Allow" buttons.
I've tried scrolling down, but scrolling is not supported with the current SDK code and permissions page. I've tried using the keyboard to get to the off-screen "Accept" button, but Android doesn't allow the user to click on off-screen buttons/links. On other devices where I can see the "Allow" button, I can DOWN arrow to the bottom, press RIGHT once, then press ENTER. Doesn't work on the LDPI screens where the button is not visible. I've tried flipping between landscape and portrait as well, but can never get to the "Accept" button.
At this point, we have nothing helpful to tell customers. We'll probably have to make a code change to work around the issue and do another release.
from facebook-android-sdk.
skreeky: Yes, they (facebook.com) changed the layout of the login java script we are accessing.
SteveMil: I did a workaround locally for the problem that worked. The problem is tied to the fact that the webview the sdk is using is connected to the browser in the phone (or its user_agent). When the java script runs in the webview and queries for screen size it gets the full pixel size of the screen (and not the size of the webview window). This means that you end up with a javascript that assumes it has the whole screen while it actually doesn't. We have status bar and a frame around the view and so on..
The workaround is to change the dialog into a separate activity instead of extending Dialog. In you manifest.xml you can set this activity to have fullscreen mode (no status bar), and thus the correct size is given to the script and everything will fit on the screen.
from facebook-android-sdk.
Thanks for the tip dephan. I'll look into making the change (I'd still prefer to keep it as a dialog and have Facebook do the work-around on their side :). I need to make a code change anyway since I just realized the Facebook client crashes on OS 1.5, and the only fix to that is a code change.
from facebook-android-sdk.
Skip and Publish buttons do not appear on the bottom of the stream.publish dialog. on small screens (QVGA).
from facebook-android-sdk.
When is support for small screens coming?
from facebook-android-sdk.
I detected that the screen was small and set the dimensions to 240x320 in fbdialog.java
When the permission page was displayed it was not perfect but the buttons were visible and I could scroll the page, cant work out what it is that allows the scroll though; maybe the page width??
from facebook-android-sdk.
I found that the web view didnt have any focus which prevented the scrolling.
mWebView.requestFocus(); in the setupWebView method seemed to help
from facebook-android-sdk.
Thanks people. There was enough info in this thread for me to fix the issue on my side. Like others have eluded to, the problem is that the SDK has two hard-coded sizes for the content view of the dialog. If the view is larger than the max dialog size (always true on LDPI), then the browser control just gets clipped by the dialog. The reason you cannot scroll is that the web control doesn't think it needs to scroll since it is physically large enough to hold the entire website (even though it is clipped by the dialog).
The quick fix for me was to just change the math for how they compute the size in FbDialog.onCreate(). I'm passing this to the LayoutParams constructor...
display.getWidth() - (int)((float)26 * scale),
display.getHeight() - (int)((float)51 * scale)
Those values generate the largest possible view that a dialog can contain on LDPI, MDPI, and HDPI (both 800 and 854 high screens) for both portrait and landscape modes.
The only other issue I had was screen rotation (my AndroidManifest.xml allows this without a dialog restart). So, whenever I detect the screen rotated, I just call setLayoutParams on the content view again and that fixes the dialog up.
from facebook-android-sdk.
When publishing a wall post does the image associated with the wall post get up-scaled if its too small as that's what appears to happen in my tests.
I generally have an image that is 128x128 for the larger screens and that appears OK on MDPI and HDPI screens but on LDPI that dialog data appeared mangled and when I tried smaller images they appeared much larger than they should be for such a small screen which made me think Facebook might be stretching the images to make them larger.
from facebook-android-sdk.
This issue should be resolved with my latest commit: 5d44d0c
Hopefully this will be a useful fix. If the issue persists for anyone, feel free to comment here.
from facebook-android-sdk.
Hi!
Thank you for emailing [email protected].
We will have a look at your email and get back to you when possible.
Regards,
The Skreeky Team
from facebook-android-sdk.
Related Issues (20)
- Unexpected "Invalid app id" error HOT 1
- Is this repository live? No answers from Facebook employees to many critical issues
- ANR:Input dispatching timed out (4b6b26a xxx/com.facebook.FacebookActivity (server) is not responding. Waited 5005ms for FocusEvent(hasFocus=true)) HOT 1
- There was a problem using Facebook version 12.3.0 integration login
- Log In with Patreon confirmation HOT 1
- Automatic event fb_sdk_settings_changed collects private user data
- Different performance when share the same link by web or native handler.
- Is somebody here from Facebook to solve almost 8 years old serious bug??? Your (and our) users are really angry https://github.com/facebook/facebook-android-sdk/issues/1216 HOT 1
- Use CustomTabActivity to open Fallback Feed Link to fix Embedded WebView Error HOT 1
- SDK impacted by CVE-2022-25647
- SDK should use isDebugEnabledField instead of BuildConfig.DEBUG
- Feature Request: external_id HOT 1
- Invalid Signature HOT 1
- Login for business
- Profile Pic
- Please allow indie developers to impelement Facebook Login without business verification
- Facebook SDK is not adding necessary manifest queries/intents for results from PackageManager.getActivityInfo.
- Important paper's
- SDK show WebView login instead of bring the Facebook App to share my content
- Facebook Deferred DeepLink is not working anymore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-android-sdk.