Quality Xin
@ Rock
Quality Xin
Tell us about the logic of deleting the file.
Quality Xin
@ Rock should not delete all the files under the cache it?
Quality Xin
@ Smart Eagle provide our temporary file full path to the rock bar
Quality Xin
@ Smart Eagle is responsible for our UCSDK technology docking
Chan Yan
We will not delete all the files under the cache
1 People Unread
Chan Yan
@ Smart Eagle isn't off duty.
All read
Quality Xin
No, he's sitting behind me.
Quality Xin
Image
Chan Yan
equals 1 again?
All read
Chan Yan
The book flag will not actively delete your files, all who want to delete files, call the DeleteFile (file file) method, will delete the
All read
Quality Xin
I don't see any rules.
Chan Yan
We're deleting our own RBI files.
All read
Quality Xin
Know
Chan Yan
But I never showed up here once.
All read
Chan Yan
How did you get out of 1?
All read
Chan Yan
Ha
All read
Quality Xin
Reboot, exit, restart, exit until you see 1
Chan Yan
Good
All read
Chan Yan
Image
All read
Chan Yan
Clicking on any item in the Second tab is open failed
All read
Chan Yan
You give it a try
All read
Zhi
There is a conjecture.
Zhi
Because the book flag has two processes, a controller, a push
Chan Yan
Now the phenomenon is not fluent, but rather than the original Ask view
All read
Zhi
The code is written in Appication.oncreate, so an estimated two processes are executed to that code.
Zhi
Therefore, it is recommended that you do not write the initialization code to app.create, if there is only one activity, it is recommended to write in the activity.
Chan Yan
OK
All read
Zhi
If you have more than one activity, it is recommended to write a singleton wrapper class that is initialized when the first activity is created.
Chan Yan
We have a total activity,mainactivity.
All read
Chan Yan
I want to write to mainactivity.
1 People Unread
Chan Yan
Two questions:
1, click on the Second tab of any item, is open failed
2, the current phenomenon is not fluent, but also the original asked view
All read
Chan Yan
These two questions, we'll debug this side.
All read
Quality Xin
First adjust the initialization of the problem first
Chan Yan
Good
All read
Quality Xin
And so on initialization no problem, normal process walk, we look at this page load is what reason
Chan Yan
Good
All read
Quality Xin
Because we are the default to go to the transit server, you may want to add some adapter switch
Chan Yan
Good
All read
Quality Xin
We're going to be here tonight. If you have a good initialization time,
Chan Yan
Okay, OK.
All read
Rock Wei Join the group
05-20 10:45
Quality Xin
@ could rock adjust the timing of the initialization is there a problem?
Chan Yan
It's now possible to download successfully.
1 People Unread
Chan Yan
Basic secondary boot to load UC kernel
1 People Unread
Chan Yan
But there is a problem, I send you a bag, you see
1 People Unread
Quality Xin
Did you have any problems with the loading yesterday?
Chan Yan
shuqi_android-debug.apk
(15.3 MB)
Download the file Dump Tray Preview Group file
1 people not checked
Chan Yan
This time I put it in the mainactivity, but I didn't see the problem yesterday.
1 People Unread
Chan Yan
You run this package, the second page, click any book cover item, are open failed, no response
In addition, the Third tab, cannot be loaded
1 People Unread
Chan Yan
These two questions that need you to look at
1 People Unread
Quality Xin
It should all be a problem.
Quality Xin
It's just not loading.
Quality Xin
Do you have special codes for loading?
Chan Yan
No, it's loadurl.
1 People Unread
Quality Xin
Can you send me that URL for a second?
Chan Yan
Good
1 People Unread
Wei
We also have some websetting on this side of the setup, is completely in accordance with the original WebView way, this will not be a problem?
Quality Xin
@ wei generally do not have too much problem, mainly to see if there are some overloaded after the interface has a special adaptation, to see exactly what the problem is
Chan Yan
Quality, the book flag output log with Sqbrowserview filter
1 People Unread
Quality Xin
Good
Chan Yan
Image
1 People Unread
Chan Yan
You can see the URL.
2 people Unread
Chan Yan
Each URL is loaded with the log output
1 People Unread
Chan Yan
Quality Xin, today I and Wei with you debugging, thank you
1 People Unread
Chan Yan
Http://appsou.demohz.shuqi.com/route.php?sq_pg_param=defin This URL, is the URL of the second tab
1 People Unread
Wei
Yes, the second one, search the book.
Wei
Click on an item in the page, the "open failed" display should be the UC kernel given, the implementation is called WebView Javascriptinterface, now the equivalent is not tuned
Quality Xin
All right, wait a minute.
Quality Xin
This page I opened with Chrome is also pop-up open failed, is it necessary to rely on the APK client?
Wei
Is the JavaScript interface that needs to callback the client
Quality Xin
Image
Quality Xin
Is this the interface we use?
Chan Yan
We'll take a look at this.
1 People Unread
Quality Xin
The Third tab, bookstore, is not to enter the URL when the time to inject JS?
Chan Yan
Image
1 People Unread
Chan Yan
Now is the page JS not injected, right?
1 People Unread
Quality Xin
Are you import Com.uc.webview.export.JavascriptInterface?
Chan Yan
The annotations we use
1 People Unread
Quality Xin
Can I try it with my full name?
Chan Yan
Image
1 People Unread
Quality Xin
You might also want to consider downgrading to the system kernel.
Quality Xin
Compatible with this situation
Chan Yan
Image
1 People Unread
Chan Yan
Image
1 People Unread
Chan Yan
JS Bridge, is the realization of this, is it the use of the original?
1 People Unread
Quality Xin
Could have used the original one.
Chan Yan
Image
1 People Unread
Quality Xin
Is this what you are quoting now?
Chan Yan
Well, we changed it, changed it to import com.uc.webview.export.JavascriptInterface, it's OK.
1 People Unread
Quality Xin
If you have them.
Quality Xin
Can be compatible with two
Chan Yan
How to be compatible with two of them?
1 People Unread
Quality Xin
Because it also takes into account the situation of downgrading to the system.
Quality Xin
Note Two package names
Quality Xin
At the same time, import Android and UC
Quality Xin
Then annotate the 2 full names Javascriptinterface
Quality Xin
Compatible with UC-free situations
Chan Yan
Well, that's what we should do.
All read
Chan Yan
Image
All read
Wei
Now that's it.
We quoted native Javascriptinterface annotations, which cannot be successfully invoked with our UC kernel, and Ucjavascriptinterface cannot be successfully invoked with the native kernel.
Wei
Image
Wei
Two references the compiler will make an error
Chan Yan
Image
1 People Unread
Zhi
Sneer
Zhi
[OK]
Chan Yan
How to annotate two, haha, the wisdom Eagle appeared
All read
Chan Yan
How to annotate two, pro
1 People Unread
Zhi
Image
Chan Yan
Yes, OK.
All read
Wei
Image
Wei
Image
Wei
Now this is what happens when you write the Javascriptinterface interface.
Quality Xin
Import our one.
Chan Yan
The original is not import, is it?
1 People Unread
Zhi
The same name class can only import one, the other one with the package name + class name directly reference
Zhi
Or do not import, all with the full path.
Wei
We wrote a set of Javascriptinterface interfaces, but switched between the UC kernel and the native kernel
Chan Yan
I understand what Zhi means, let's try it.
All read
Chan Yan
We'd like to introduce the native full path of UC.
All read
05-20 11:48
Zhi
Good.
Chan Yan
Just a test, this way is OK
All read
Chan Yan
The page is ready to load.
All read
Chan Yan
However, now the UC Kernel load Search tab, the smoothness is not as good as the native WebView
All read
Chan Yan
What's the situation? Sneer
All read
Quality Xin
Load smoothness?
Chan Yan
Yes, yes.
1 People Unread
Quality Xin
Refers to the loading speed?
Chan Yan
Smoothness of sliding
1 People Unread
Quality Xin
Smoothness of sliding
Quality Xin
Good
Chan Yan
This is what we need most.
All read
Chan Yan
is also the most essential requirement of access
All read
Wei
Is there any way we can switch silently when this first time we get into the download? Or a second boot is required to cut into the UC kernel.
Quality Xin
Silent ' but need a second time new WebView
Quality Xin
Send a bag. ' Let's look at the smoothness problem.
Chan Yan
Good
All read
Chan Yan
This bag, try it.
All read
Chan Yan
Shuqi_android-debug (1). apk
(15.3 MB)
Download the file Dump Tray Preview Group file
2 people not checked
05-20 13:39
Zhi
Do you have an AC open? Can the initialization option be affixed?
Quality Xin
. Setup (uccore.option_hardware_accelerated, True)
Quality Xin
To use this
05-20 13:53
Chan Yan
It needs to be written into the initialization code, right?
1 People Unread
Quality Xin
Yes, to add this option
Quality Xin
Image
Quality Xin
This is your right side of the code, is not open AC
Chan Yan
Because native WebView turns on hardware acceleration, there are crash and other adaptation issues on some models
1 People Unread
Chan Yan
We don't have this problem with our UC kernel, do we?
1 People Unread
Quality Xin
We will have compatibility if you have a known machine on hand that you can use to test under
Chan Yan
Did you deal with a particular machine?
1 People Unread
Chan Yan
Do you not turn on hardware acceleration for certain models?
1 People Unread
Quality Xin
We will judge the operating environment.
Chan Yan
Good
1 People Unread
Chan Yan
But I feel strange, using the UC kernel, also need to turn on hardware acceleration?
1 People Unread
Quality Xin
It is a two-way experience that is not open.
Quality Xin
You can try it first.
Chan Yan
Shuqi_android-debug (2). apk
(15.3 MB)
Download the file Dump Tray Preview Group file
2 people not checked
Chan Yan
Image
All read
Chan Yan
I'm still not fluent on the Meizu pro phone
All read
Chan Yan
Hardware acceleration turned on
All read
Chan Yan
Quality, you try.
All read
Quality Xin
Well, the newest bag is open, send me
Chan Yan
The bag is already in the group, please check it
All read
05-20 14:18
Zhi
@ Can rock hardware acceleration also requires the Windows system to open, do not know whether also set up?
Chan Yan
Is it open in the corresponding activity?
All read
Zhi
Activity.oncreate () {
Setup Hardware Acceleration
if (SSYSTEMSETTINGS.MUSEHARDWAREAC) {
Final int flag_hardware_accelerated = 0x01000000;
GetWindow (). SetFlags (flag_hardware_accelerated, flag_hardware_accelerated);
}
}
Zhi
That's right.
Chan Yan
Complete code, put it in a little bit.
All read
Chan Yan
if (SSYSTEMSETTINGS.MUSEHARDWAREAC) {
Final int flag_hardware_accelerated = 0x01000000;
All read
Chan Yan
No, No.
All read
Zhi
The new 4.x or more mobile phones are basically supported hardware acceleration, this option is thin can do very complex
Chan Yan
Yes
All read
Chan Yan
With native WebView, if you turn on hardware acceleration, you can basically meet your needs.
All read
Chan Yan
Now that the kernel also needs to be enabled for hardware acceleration, I've raised the question of whether there will be compatibility issues with various systems and models
All read
Chan Yan
Will cause problems like crashes
All read
05-20 14:40
Chan Yan
Image
All read
Chan Yan
Mainactivity has turned on hardware acceleration
All read
Chan Yan
It turned on.
All read
Chan Yan
Image
1 People Unread
Chan Yan
Added hardware acceleration to both layout and mainactivity
1 People Unread
Chan Yan
Shuqi_android-debug (3). apk
(15.3 MB)
Download the file Dump Tray Preview Group file
2 people not checked
Quality Xin
Your cell phone is the Meizu MX5?
Chan Yan
Quality, look at this bag, loading speed should be enough, just sliding speed, or not smooth
All read
Chan Yan
Meizu 4 Pro
All read
Quality Xin
I have a question.
Chan Yan
Well
All read
Quality Xin
Book banner page, on the UC browser, fluent?
Quality Xin
Is that you might want to compare your current phone
Quality Xin
On the UC browser, the same page, swipe whether the same
Chan Yan
Bs.demowx.shuqi.com/route.php?appfunction=an_bmk,1_clo,1_smjs,1&soft_id=1&ver=160429&appver= 9.7.0.31&platform=an&placeid=1073&imei=865863027509616&mac=&cellid=13&lac=-1&sdk= 22&wh=1536x2560&imsi=460025107057243&msv=3&enc=302491463727811921&sn=1447292150187740& vc=ae2b&mod=mx4+pro&manufacturer=meizu&brand=meizu&net_type=wifi&first_placeid=src1073 &aak=643332&user_id=267752155&session=fj9pfkfqhq9kqgn9potpqqmhttnpn&utype=pre_vip&net=4 &net_env=4&writer_switch=1&sq_pg_param=bsrc
All read
Chan Yan
A little better than the book flag.
All read
Chan Yan
Image
All read
Chan Yan
This is the QR code for the Book tab.
All read
Chan Yan
You can sweep.
All read
Chan Yan
Some mobile phones are smooth, some mobile phones such as my Meizu Pro4, it is not smooth
All read
Quality Xin
@ Rock Search has been zoned, right?
Chan Yan
Just now I said there is a problem, is the original WebView Drive hardware acceleration, very smooth, switch to UC WebView is not so smooth
All read
Chan Yan
Yes
All read
Chan Yan
Place the URL of the search book in the UC browser, it is smooth
All read
Chan Yan
Sneer
All read
Wei
Now the speed of loading with the UC kernel is very fast, that is, sliding will feel obvious lag
Chan Yan
@ Quality Xin This is a new bag, you see
1 People Unread
Chan Yan
Shuqi_android-debug (4). apk
(15.3 MB)
Download the file Dump Tray Preview Group file
2 people not checked
Quality Xin
@ wei Slow situation I see, but this page to tune to see what is the problem
Chan Yan
Good
1 People Unread
Wei
Ok
Chan Yan
Help to see, just sent a bag in the group
1 People Unread
Quality Xin
What do you see on the Meizu MX5 or the soft AC?
Chan Yan
Where to use the soft AC
1 People Unread
Quality Xin
Or whether you can make sure that your activity is in the Shuqi with the use of AC in Meizu.
Quality Xin
Image
Quality Xin
This is the operating condition on the MX5, we can see through this debug switch or SF, soft AC
Chan Yan
It's smooth.
1 People Unread
Chan Yan
Image
All read
Chan Yan
Turn this piece off, it's smooth.
All read
Chan Yan
Used to be open.
All read
Chan Yan
This bag, quality, you try.
All read
Chan Yan
Shuqi_android-debug (5). apk
(15.3 MB)
Download the file Dump Tray Preview Group file
3 people not checked
05-20 15:45
Chan Yan
@ quality We are at the view level, turn on hardware acceleration, okay?
All read
Quality Xin
@ Smart Eagle
Quality Xin
To activity
Wei
Now the test at the view level of hardware acceleration is good, activity level, it will be more expensive, because we are involved in webview activity or quite a lot of
Quality Xin
From the phenomenon of the words, is to search the book over the WebView or affected by the adaptation layer, using the SF
Quality Xin
This is your assessment, but the problem is basically this.
Chan Yan
We added the activity inside, not adding hardware acceleration at the view level. The activity that needs to be added here is about 10 or less, mostly inheriting base
All read
05-20 16:09
Chan Yan
@ Quality @ Smart Eagle
Ask a few questions:
Book banner fiction now supports mobile phones of 2.3 and above
1, now adding hardware acceleration on the activity, may be on a phone that does not support hardware acceleration, will cause a control outside the WebView rendering problems? If the UC kernel fails to download, does using the native WebView in the SDK cause problems with turning on hardware acceleration?
2. What if we add hardware acceleration at the view level, for example: adding hardware acceleration only to UC WebView? Why do I have to be at the activity level?
All read
Zhi
1.1.4 View Level
We can disable hardware acceleration for individual view at run time phase. We can use the following code:
Myview.setlayertype (view.layer_type_software, NULL);
Note: Hardware acceleration at the view level is not possible at this stage.
Zhi
In essence, your activity enables hardware acceleration, but some view, which does not want to be treated as a layer alone, can be disabled, so that some layers will use software compositing, like PS, which merges multiple layers into a single bitmap, forming a layer within the hardware acceleration, and compositing with other hardware acceleration layers.
Wei
With hardware acceleration at the activity level, the main concern is the impact on the activity's non-webview controls, because compatibility with some low-end phones can render
Zhi
So I said the setup of hardware acceleration options is a more complicated process.
Zhi
According to the experience of Personal Edition, it consists of three steps.
Chan Yan
That is to say, your SDK's mechanism, to the overall hardware acceleration, have a good processing strategy, right?
All read
Chan Yan
Can we use it at ease?
All read
Zhi
1, according to the interface provided within, Com.uc.webview.export.utility.Utils.checkSupportSamplerExternalOES () to determine whether the machine supports hardware acceleration. and set it to activity.
2, through the view of the Dispatchdraw (canvas canvas) interface obtained by the canvas parameters (first draw), to determine whether the canvas is a hardware canvas, if not, disable AC.
3. Initialize the kernel with the final AC value.
Chan Yan
Do you have a document? Share one
All read
Chan Yan
I'm also studying
All read
Chan Yan
Sneer
All read
Zhi
No, this is in collaboration with the personal version of the process organized.
Zhi
Their implementations also have bugs because the kernel is initialized before the first draw, that is, 3 and 2 are reversed, so there are still bugs.
Zhi
With hardware acceleration at the activity level, the main concern is the impact on the activity's non-webview controls, because compatibility with some low-end phones can render
@ wei This I have no experience, do not know whether setting this option will cause other view problems, but should not it? Hardware acceleration is supported only for versions above 14.
Chan Yan
If I turned on hardware acceleration in AC, if I failed to download the UC kernel in the SDK, this time using the native WebView in the kernel, it's OK to turn on hardware acceleration, right?
All read
Zhi
1, according to the interface provided within, Com.uc.webview.export.utility.Utils.checkSupportSamplerExternalOES () to determine whether the machine supports hardware acceleration. and set it to activity.
In this first step, the personal version of the implementation, in addition to the kernel interface, they also have many conditions, such as the SDK version, such as memory size, such as the size of the screen, such as other requirements
Zhi
@ Rock No need to worry about the hardware acceleration code of the system.
Zhi
@ can rock I see you are set to Androidmanifest go, the proposal is dynamic setting, through and personal version of communication experience, through a series of conditions to determine whether the appropriate hardware acceleration.
Chan Yan
We need to use the Utils.checksupportsamplerexternaloes () method to determine if the current machine is suitable for hardware acceleration, right?
All read
Chan Yan
Suitable for the use of code to turn on AC hardware acceleration, not suitable, do not open, right?
All read
Wei
Excuse me:
Failed to download the UC kernel in SDK or the first time I loaded the SDK, using the native WebView in the kernel
In this scenario, the Utils.checksupportsamplerexternaloes () method can be used to determine if I am fit to turn on hardware acceleration? (The native WebView is used in this scenario and does not want to turn on hardware acceleration)
Zhi
@ Zhang Zanyan checksupportsamplerexternaloes () just stand at the kernel angle and check to see if the GL API used by the kernel meets the requirements.
Zhi
@ can rock theoretically, the activity may work in hardware acceleration mode, but because the kernel's OpenGL API is not supported, it is also possible to use software to draw webview.
Zhi
@ wei Checksupportsamplerexternaloes () does not require the UC kernel to execute, it is just some check.
Chan Yan
If WebView uses software to draw, that is, using the UC kernel, it will also be very fluid
All read
Zhi
It's usually a low-end machine under 4.0.
05-20 17:10
Zhi
1, set to whether the window system should be hardware acceleration (API version, memory, screen, stability, etc.), it is recommended that the condition plus checksupportsamplerexternaloes.
2, the first screen drawing, determine whether to draw canvas is hardware.
3, check the UC kernel conditions, checksupportsamplerexternaloes, eligible and 2 for the hardware canvas, set the UC kernel to use hardware acceleration, otherwise the other conditions set to false.
05-20 17:51
Chan Yan
@ Quality Xin hand Amoy side, hardware acceleration related functions, is how to set AH?
All read
Quality Xin
Manual scouring is more than 4.0 to install
Quality Xin
Without the above concerns
Chan Yan
Is that the reckless AC turns on hardware acceleration.
All read
Quality Xin
Well
Chan Yan
Image
All read
Chan Yan
I understand, more than 4.0, we turn on hardware acceleration, under 4.0, we do not turn on hardware acceleration
All read
11:46
Wei
@ Quality Hi, we are now doing the SDK for Android This browser framework, there are currently two issues with the introduction of the UC kernel:
1, the document says 4.0 below does not support hardware acceleration, because our SDK needs to be compatible with 4.0 below, so we need to have a judgment on the current version and then turn on hardware acceleration, the problem is that if hardware acceleration is the activity level, every activity that wants to use our SDK needs to make a judgment, because do not know except WEBV If other controls outside of Iew require hardware acceleration, then the abstraction of the SDK is not too good! The question is, can you use the view-level hardware acceleration? Or the view level and the acitvity level, what is the difference between the bottom of our kernel?
2, more than 4.0 turn on hardware acceleration, the first time into the application to load the UC kernel, this is still native webview, hardware acceleration will also affect the native WebView. Is it still necessary to determine if the UC kernel is loading and then turning on hardware acceleration?
Zhi
Hardware acceleration, not when you want to drive.
Zhi
Before the first screen is drawn, it must be determined.
Wei
Yes, so before the activity is loaded, you need to determine
Zhi
What we provide externally as an SDK is an acceleration option setting plus a check interface.
Zhi
Similarly, you can also set, whether an AC initialization option, provide an API check (inside the suggestion plus your check logic, as well as our external Checksamples interface), can be.
Wei
What's the difference between the view level and the acitvity level hardware acceleration kernel bottom?
Zhi
We recommend that you look at the documentation for the rendering schema first.
Zhi
The activity is rendered from the Viewroot
Zhi
The beginning.
Zhi
The following view tree nodes, by some rules, can be organized into multiple layers that can be represented individually.
Wei
But there are some specific view I if I do not need to speed up rendering, it is necessary to set the
Zhi
And some view, you can display the declaration, you do not want to be a separate display layer (that is, not the hardware accelerator layer), its rendering is first and other layers merged into a bitmap, and finally become a hardware accelerator layer, and finally the other hardware acceleration layer on the GPU to be synthesized.
Wei
Good
Zhi
I pull a rendering of the great God answer your questions will be more professional.
Wei
The first time I entered, the native WebView I also want to display the statement, do not do hardware acceleration it
Zhi the Yixu into the group
Wei
You know, thanks.
Zhi
Actually, it's very simple. All you have to do is determine if the activity is going to turn on AC, then use an algorithm: (Own open condition && UC Kernel open condition && system kernel on condition)
Zhi
Where you have open conditions, can be the memory size of the judgment, CPU core count, the system version of the judgment.
Zhi
The condition of the UC kernel is the Checksamplesxxxxxx interface.
Zhi
The condition of the system kernel is that you filter out the characteristics of the models that have found the stability problem.
Chan Yan
System kernel Conditions This, we do not judge, the model too much to fit together too complex, or there will be missing models, if you can judge well, we already gave the original WebView hardware accelerated
All read
Zhi
Similarly, you have to do the SDK, you put the above three conditions, into a function, to provide to your customers, and inform each other, this is your book Flag SDK support AC requirements.
Zhi
@ could rock this is by accumulating, through a grayscale version released, slowly accumulate model characteristics data.
Chan Yan
This U
All read
Chan Yan
Uc
All read
Chan Yan
Is there a more mature accumulation over there?
All read
Chan Yan
You are the browser, in your UC browser, how to access the UC kernel?
All read
Zhi
Roger the Great God is our technical expert in charge of rendering architecture, he should have authoritative opinion.
Zhi
@ Rock is similar to what you are now accessing.
Chan Yan
We need a mature solution to determine if hardware acceleration is turned on? This is what we need to access the UC kernel.
All read
12:27
Yixu 12:27:49
The kernel itself is not limited, that is, the product from memory consumption considerations, limit the low memory of the phone using software rendering
Shuqi novel access to UC browser kernel technical dialogue (i)