Comments (6)
Thanks a lot!
This library has only been tested in normal Activity
classes so far. But in FragmentActivity
, which you used, there is an additional condition:
public void startActivityForResult(Intent intent, int requestCode) {
if (requestCode != -1 && (requestCode&0xffff0000) != 0) {
throw new IllegalArgumentException("Can only use lower 16 bits for requestCode");
}
super.startActivityForResult(intent, requestCode);
}
So we'll just have to change the hard-coded request code to a lower value.
from android-advancedwebview.
Nice that you realized that it was related to Fragments (I didn't know that)!
Not sure if this is also related, but fragments "public void onActivityResult (int requestCode, int resultCode, Intent intent)" won't get called, so one has to forward from the parent activity to the correct fragment. (I'm not very experienced Android developer so not sure what the correct/expected behaviour should be in that scenario)
from android-advancedwebview.
The issue should have been fixed with the following commit now: 90c3937
Can you please try the updated JAR and report if it works?
Regarding your other issue, please make sure that you don't call getActivity().startActivityForResult()
but simply startActivityForResult()
and then implement onActivityResult()
in the Fragment
subclass.
from android-advancedwebview.
It seems to work, thank you!
Regarding my other issue. I'm never calling the startActivityResult()
, it's called inside AdvancedWebView.java
, in openFileInput(...)
. Which will only call onActivityResult()
in my ActionBarActivity.java
(which contain the fragments).
ActionBarActivity.java:
@Override
public void onActivityResult (int requestCode, int resultCode, Intent intent) {
if(mFragment != null)
mFragment.onActivityResult(requestCode, resultCode, intent);
}
from android-advancedwebview.
You're right, sorry. So onActivityResult
will, rightly, never be called inside your Fragment
but only in the Activity
. Can you please open a new issue for the problem that one has to forward from the Activity
to the correct Fragment
? Thanks!
from android-advancedwebview.
@ocram
Hello Oracam ,
I am working on google fit api integration in my android application , i am getting following error ,
Please help me. Thanks.
i used fitness dependency.
Process: com.alaramdemosample, PID: 16857
java.lang.IllegalArgumentException: Can only use lower 16 bits for requestCode
at android.support.v4.app.BaseFragmentActivityGingerbread.checkForValidRequestCode(BaseFragmentActivityGingerbread.java:88)
at android.support.v4.app.BaseFragmentActivityGingerbread.startIntentSenderForResult(BaseFragmentActivityGingerbread.java:75)
at android.support.v4.app.FragmentActivity.startIntentSenderForResult(FragmentActivity.java:77)
at com.google.android.gms.common.ConnectionResult.startResolutionForResult(Unknown Source)
at com.google.android.gms.common.api.internal.zzw$zzb.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5896)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Please help me.
from android-advancedwebview.
Related Issues (20)
- (Fullscreen) videos not working HOT 1
- Loading iframe inside webpage
- Is the XSS vulnerability fixed here? HOT 3
- Migrate to mavenCentral HOT 1
- Unable to view PDF From Amazon Service Url in AdvanceWebview. HOT 2
- Update AdvancedWebView and increase performance HOT 1
- Help to make downloads work in Jasonette-Android Advanced Webview Branch HOT 6
- Allow fullscreen mode ? HOT 1
- There is no loadHtml() command.
- Support to open google maps link with the google maps app HOT 1
- Datatables export buttons not working.
- Cannot cast my MainActivity into Advanced Webview Listener HOT 2
- Hide header and footer HOT 1
- Camera and audio permission issue
- Unresolved reference: im HOT 1
- Ask for photo on picture upload
- ANR HOT 1
- im.delight.android.webview.AdvancedWebView, was not found in the project or the libraries HOT 1
- How to disable webview navigate to another page?
- PDF URL does not get open
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 android-advancedwebview.