Related
Hi all,
It seems that certain people (most notably multiple HD2 users) are having crashes and other issues with ArkSwitch. I have a Fuze (Touch Pro), and I'm not experiencing these issues. Therefore, it's virtually impossible for me to fix them.
I ask for your help finding and fixing these bugs, if you have any device that is not a Touch Pro. The source code is available at http://arkswitch.codeplex.com and I would really appreciate some help from any devs that have an HD2 or pretty much any device other than my own.
Let's use this thread to discuss code issues, and the "main" thread for everything else.
Thanks a lot!
Hi ark,
I'll take a look into it (I have an HD2, and sometimes it freezes for me also)
I've coding skills so no worries
See you later
PS. Nice app!
Cool, thanks!
Works fine on my HD
Only crashes when i try to include a image as a selector
hi Arktronic,
I have included ArkSwitch in my ROM v1.8, but have to remove it in next release.
Here are some problems found:
- I have to exclude it from CleanRAM otherwise CleanRAM will take the phone down.
- top taskbar (I'm using WM6.5.5) will be no longer accessible if ArkSwitch has been terminated by other apps (such as Task Manager 3.1, CleanRAM), or sometimes closed by itself.
However, I like the way ArkSwtich "take down" other apps, such as cprog.exe (Phone). It really removes cprog from the memory and free up some RAM without crashing the phone.
Is it possible to make ArkSwitch NOT to stay in RAM?
P/S: Sorry, I'm off topic. You want to discuss coding? Where can I get the code?
If you don't want ArkSwitch to stay in RAM, enable WM65 compatibility mode. Depending on what the user does then, it will either quit or minimize (but be friendly to the system if killed by CleanRAM or others).
Like I said in the first post, the source code is available here: http://arkswitch.codeplex.com/
Okay I did a debug session,
It seems to freeze here:
// Get the window text or else continue enumerating.
if (!GetWindowText(hwnd, WindowTextSb, 1024)) return 1;
in
static int EnumWindowsCallback(IntPtr hwnd, uint lParam)
In some cases the function GetWindowText doesn't return...
If I remove this call, it will load without any freeze
Interesting. Does that happen when there is another app that has frozen, or is it just random?
Maybe I forgot to lock that callback procedure in memory to prevent the GC from moving it around...
Arktronic said:
Interesting. Does that happen when there is another app that has frozen, or is it just random?
Maybe I forgot to lock that callback procedure in memory to prevent the GC from moving it around...
Click to expand...
Click to collapse
Seems that just some apps makes it freeze. I just noticed that an app written by me in c++ makes it freezing every time
If it is closed instead, arkswitch loads up normally.
I forgot:
It is not frozen. But it hosts a IE control in it if that could help.
btw I don't think is a GC problem...
I don't think an IE control would have such an effect. Is it a normal window, and does it have title text?
Arktronic said:
I don't think an IE control would have such an effect. Is it a normal window, and does it have title text?
Click to expand...
Click to collapse
I was searching a way to implement IE Control correctly due to netcf's scrolling bug with it. My exe is a modification of this one http://cid-e91b74403814953e.skydrive.live.com/self.aspx/BrowserWithGestures/BrowserWithGestures.zip which I'm using as support to my main app...
I'll look at that when I get a chance. Thanks again!
Arktronic said:
I'll look at that when I get a chance. Thanks again!
Click to expand...
Click to collapse
I'm going to look again on that piece of your code instead, maybe I will figure it out because it freezes.
I think i found the answer:
Internally, GetWindowText calls SendMessage(hWnd, WM_GETTEXT) to the window.
Since the thread calling GetWindowText (your thread) and the thread that
owns the window are different threads, the SendMessage
internally becomes a PostMessage, which sticks the message in the owning
thread's message queue and blocks until the message is processed by the
owner thread. You are now at the mercy of the owner thread to process that
message. If that thread isn't running a message pump, you're stuck.
Click to expand...
Click to collapse
you should use
SendMessageTimeout(hWnd, WM_GETTEXT, ..., 1000L,...). You'll be blocked for
1 second tops. You can of course send in a longer delay, but 1 second
should be sufficient.
Click to expand...
Click to collapse
Let's fix it
I'll post fixed source as soon as I end.
Wow, great find! I'll change it as soon as I can. This explains why other apps freezing causes ArkSwitch itself to freeze.
EDIT: Oh, if you're going to change it yourself, that works too
Fixed. It doesn't freeze anymore.
I'm doing some other checks, then I'll post corrected source code
w00t! You are awesome
Arktronic said:
w00t! You are awesome
Click to expand...
Click to collapse
I read on codeplex "Removed global memory status information retrieval as a test..."
Why you did so?
Where I need to touch to re enable it?
PS. Thanks, i just like to help
I did it as I was testing various things with Long Zheng to determine why ArkSwitch crashed on his HD2. We seemed to get somewhere with the removal of that, but then it started crashing again. I suggest you just go with change set 44738, as that has the latest stuff in it, except for the unnecessary removal of global memory info.
Arktronic said:
I did it as I was testing various things with Long Zheng to determine why ArkSwitch crashed on his HD2. We seemed to get somewhere with the removal of that, but then it started crashing again. I suggest you just go with change set 44738, as that has the latest stuff in it, except for the unnecessary removal of global memory info.
Click to expand...
Click to collapse
Ok.
Do you know how to detect sliding the finger on listview? I would add a process view which opens on sliding finger from right to left but there is not any mousedown/up event...
Hi there,
Does anyone out there how to preserve/restore the transient state of a CheckBox and/or Radio button?
So far, I'm using the following code, working for textbox
Code:
Public Sub PreserveState_TextBox(ByVal TB As TextBox)
Dim buffer As String = String.Empty
If True = PhoneApplicationService.Current.State.ContainsKey(TB.Name) Then
buffer = TryCast(PhoneApplicationService.Current.State(TB.Name), String)
If Not String.IsNullOrEmpty(buffer) Then
TB.Text = buffer
End If
End If
End Sub
Public Sub RestoreState_TextBox(ByVal TB As TextBox)
If True = PhoneApplicationService.Current.State.ContainsKey(TB.Name) Then
PhoneApplicationService.Current.State.Remove(TB.Name)
End If
PhoneApplicationService.Current.State.Add(TB.Name, TB.Text)
End Sub
it possible to modify the above code to work for Checkbox and/or Radiobutton?
If not, any ideas?
So far, I've been trying the sample "Tombstoning" sample code from Microsoft without any luck...
Thanks in advance!
Hi,
I'm not a VB developer, but storing the state of a checkbox is not much different from storing any other primitive type. What you could do is have a bool variable "isCbChecked" and store that bool state in your PhoneApplicationService.State.
Code:
PhoneApplicationService.Current.State.Add("isCbChecked", myCheckbox.IsChecked)
Then, when you're restoring your app, simply do
Code:
myCheckbox.IsChecked = (bool)PhoneApplicationService.Current.State.ContainsKey("isCbChecked");
keyboardP said:
Hi,
I'm not a VB developer, but storing the state of a checkbox is not much different from storing any other primitive type. What you could do is have a bool variable "isCbChecked" and store that bool state in your PhoneApplicationService.State.
Code:
PhoneApplicationService.Current.State.Add("isCbChecked", myCheckbox.IsChecked)
Then, when you're restoring your app, simply do
Code:
myCheckbox.IsChecked = (bool)PhoneApplicationService.Current.State.ContainsKey("isCbChecked");
Click to expand...
Click to collapse
Thanks a lot for your fast reply.
Can I ask for additional help on how to make your statements into generic procedures, at least to take them to something similar to what I posted?
Don't care if it's in C#
Thanks in advance!
GFR_2009 said:
Thanks a lot for your fast reply.
Can I ask for additional help on how to make your statements into generic procedures, at least to take them to something similar to what I posted?
Don't care if it's in C#
Thanks in advance!
Click to expand...
Click to collapse
Off the top of my head, something like this should work (C# code).
Code:
public static T RestoreState<T>(string key)
{
if (PhoneApplicationService.Current.State.ContainsKey(key))
{
return (T)PhoneApplicationService.Current.State[key];
}
return null;
}
'T' is the type that will be used. In C# 'T' is a special character denoting the generic type, not something I just used
So in the code above, the return type is 'T' and when using RestoreState, it will be 'RestoreState<Textbox>("TB.Name");'. The value of 'TB.Name' will be searched within the dictionary and, if it's found, it will cast that object as 'T' (Textbox) and return it, otherwise it will return null.
Hi,
So far, I did the following and while no error is raised, nothing happens...
Code:
Public Function Backup(ByVal token As String, ByVal value As Object) As Boolean
If Nothing Is value Then
Return False
End If
Dim store = PhoneApplicationService.Current.State
If store.ContainsKey(token) Then
store(token) = value
Else
store.Add(token, value)
End If
Return True
End Function
Public Function Restore(Of T)(ByVal token As String) As T
Dim store = PhoneApplicationService.Current.State
If Not store.ContainsKey(token) Then
Return Nothing
End If
Return CType(store(token), T)
End Function
I call them as follows
Code:
Backup(Me.CheckBox_1.Name, Me.CheckBox_1)
Restore(Of CheckBox)(Me.CheckBox_1.Name)
Don't where is the error, maybe you could take a look and help me out.
Any help is much appreciated!
Where are you calling the Backup and Restore functions? Since your doing page specific things, you could do it in the OnNavigatedFrom and OnNavigatedTo methods, respectively.
keyboardP said:
Where are you calling the Backup and Restore functions? Since your doing page specific things, you could do it in the OnNavigatedFrom and OnNavigatedTo methods, respectively.
Click to expand...
Click to collapse
Hi,
I'm calling them in the OnNavigatedTo and OnNavigatedFrom methods, as you pointed out
Unfortunately, nothing happens at all!
Thanks!
Hi,
As far as I can tell, there's nothing wrong with your saving/loading code. When you call
"Restore(Of CheckBox)(Me.CheckBox_1.Name)", is that returning a bool? You need to assign that bool to the checkbox:
Code:
myCheckbox.IsChecked = Restore(Of CheckBox)(Me.CheckBox_1.Name);
Also, all variables are reset when the page loads, so make sure you have set "myCheckbox.IsChecked" anywhere else on the page that could be called when the page loads.
Please, check the converted code of the above functions, to C#
Code:
public bool Backup(string token, object value)
{
if (null == value)
{
return false;
}
var store = PhoneApplicationService.Current.State;
if (store.ContainsKey(token))
{
store(token) = value;
}
else
{
store.Add(token, value);
}
return true;
}
public T Restore<T>(string token)
{
var store = PhoneApplicationService.Current.State;
if (! (store.ContainsKey(token)))
{
return default(T);
}
return (T)(store(token));
}
Do you think they are OK?
How should I call them ?
Clearly, the restore does not returns a boolean...
Honestly, I'm lost now!
Hope this helps to find the culprit.
It seems okay to me. You'll have to do some debugging. Set a breakpoint inside the Backup and Restore methods. Step through each line and make sure it's going to the line you expect it to and that the value being set is the correct one.
I haven't seen the tombstoning sample from MSDN, but can you get that to work? If so, is the generic method causing the problem? Or can you not get it to work at all?
Hi,
Sorry for the delay in getting back, but I was trying different codes and at least I found the cause.
Code:
Me.NavigationService.Navigate(New Uri("/PivotPage1.xaml?Name=" & "John", UriKind.Relative))
[B]Me.NavigationService.GoBack[/B]()
Me.NavigationService.Navigate(New Uri("/PivotPage1.xaml", UriKind.Relative))
Everything works fine, and the Checkbox state is saved/restored (in the Pivot Page) if I GO BACK using the GoBack hardware button or Me.NavigationService.GoBack
But, the state's dictionary entry is lost or ignored if I go back with the Navigate service (lines 1 and 3)...
Problem is that I need to get back with the query string...
The query string contains a value taken in the SelectedItem event of PAGE2's ListBox, and automatically once retrieved must go back.
I didn't know until know, that NavigationService.Navigate creates a new page instance or something like that in the backstack...
Any sugestions are welcomed!
Hi,
There are various methods you can use depending on the app's architecture. For example, you could have a 'shared' class that contains a shared field that holds the SelectedItem value. When the user selects the item, set the shared field's value and then when you go back, you can get the value from the shared field.
keyboardP said:
Hi,
There are various methods you can use depending on the app's architecture. For example, you could have a 'shared' class that contains a shared field that holds the SelectedItem value. When the user selects the item, set the shared field's value and then when you go back, you can get the value from the shared field.
Click to expand...
Click to collapse
So, no other way to cope with the navigation service?
It's a strange behaviour for sure...
Will try your ideas.
Thanks a lot for your reply!
GFR_2009 said:
So, no other way to cope with the navigation service?
It's a strange behaviour for sure...
Will try your ideas.
Thanks a lot for your reply!
Click to expand...
Click to collapse
There are other ways. For example, instead of using the PhoneApplicationService to store the tombstoning information, you could put it in a querystring for page 2. Then, in page 2, you could add the information from the previous page to a querystring AND the information of the selected item to the querystring. Navigate to page 1, with the querystring that contains information on what was there before and what the user selected. Tombstoning is there for when the user presses the hardware search button, home button, a phone call arrives etc.. It's not there for the navigation of the app. That's where querystrings, shared variables, binary serialization etc... come into play.
The concept of the navigation service is similar to a website. For example, when you submit something and then go back, it might still be there in the page state. However, if you submit something and then reload the previous page by typing it in the address bar, it becomes a completely new page as no state is stored.
keyboardP said:
There are other ways. For example, instead of using the PhoneApplicationService to store the tombstoning information, you could put it in a querystring for page 2. Then, in page 2, you could add the information from the previous page to a querystring AND the information of the selected item to the querystring. Navigate to page 1, with the querystring that contains information on what was there before and what the user selected. Tombstoning is there for when the user presses the hardware search button, home button, a phone call arrives etc.. It's not there for the navigation of the app. That's where querystrings, shared variables, binary serialization etc... come into play.
The concept of the navigation service is similar to a website. For example, when you submit something and then go back, it might still be there in the page state. However, if you submit something and then reload the previous page by typing it in the address bar, it becomes a completely new page as no state is stored.
Click to expand...
Click to collapse
Hi,
Will try your suggested approach, and thanks a lot for the last explanation on how the darn thing works.
Thanks again!
GFR_2009 said:
Hi,
Will try your suggested approach, and thanks a lot for the last explanation on how the darn thing works.
Thanks again!
Click to expand...
Click to collapse
You're welcome . It's one of those things that take a bit of time to understand, but starts to make sense. You might be interested in a free WP7 development ebook by Charles Petzold.
keyboardP said:
You're welcome . It's one of those things that take a bit of time to understand, but starts to make sense. You might be interested in a free WP7 development ebook by Charles Petzold.
Click to expand...
Click to collapse
I already have the book, but will need a deeper reading
So far, I've been testing your idea of using global classes and works ok.
Thanks a lot for being so cooperative, it's much appreciated!
GFR_2009 said:
I already have the book, but will need a deeper reading
So far, I've been testing your idea of using global classes and works ok.
Thanks a lot for being so cooperative, it's much appreciated!
Click to expand...
Click to collapse
No worries! If programming was super easy everyone would be doing it
keyboardP said:
No worries! If programming was super easy everyone would be doing it
Click to expand...
Click to collapse
Never said better!
ROMs affected for sure: iNsertCoin v2.0.0 and RCMixHD v3.5 (both A2SD)
Whenever I type in characters in HTC Dialer to search for a name (e.g. 846 for contacts named 'Tim') the first number gets ignored, resulting in search results starting with characters represented by the numbers '46', e.g. 'Ho...'.
Similarly, when I try to access the test screen via *#*#4636#*#*, the first character '*' gets ignored (it even disappears after putting in the first '#').
If I put in something, then remove it with backspace and start over, it does work.
Don't think it's relevant, but Baseband version is 32.49.00.32U_5.11.05.27.
What is happening here? Tried setting different locale in settings, different keyboards, no change. Thanks in advance.
Ok second post now. Maybe your phone is a little nakered, rom broke a little. It seems your just getting software errors which happen when you flash custom roms.
Posted this here in Q&A after iNsertCoin developer suggested me to do so. He heard of this problem before, but had no solution. Hopefully other ppl have found one, but an extensive search both here and on other forums did not give any result.
Solved
After (quite!) some more research, I've found a similar problem described in the topics below. The presented fix there also solved my problem (see quote):
With great help of some participants of xda forum a workaround for this issue has been found: just remove the dialer shortcut from the dock (set it to "blank") and then add it back in (a shortcut to "Phone" app). This will fix the problem.
Apparently, people who are not experiencing the issue are the people who already recreated their dialer shortcut while customizing the dock. Meanwhile, people who keep the initial dock (or, more precisely, the initial dialer shortcut) all experience this problem. The problem is not limited to Plus version - a plain LaucherPro has it as well.
It looks like LauncherPro, as shipped, uses some unorthodox way to launch the dialer (I wonder why), which is what's causing the latter to act up. Recreating it as an ordinary app shortcut fixes the problem.
Click to expand...
Click to collapse
Sources:
http://www.launcherpro.com/forum/viewtopic.php?f=14&t=5884
http://forum.xda-developers.com/showpost.php?p=10490200&postcount=15
Hey everyone, I've been a lurker for quite sometime, so I'm finally posting something. This is isn't in any of the dev sections because this is my first post.
When I first got my GNex (toroplus) was very annoyed with the capabilities of the gsd4t gps chip. Static navigation makes it really hard to use the chip for telemetry projects and the 1Hz position update doesn't give me enough sample data for the things I'm working on. I decided to do some investigation to see if it was limited to the hardware itself or the driver.
I scoured the forum, and tried a bunch of apps, found datasheets and the what not and nothing really improved my situation. I decided to take matters into my own hands and poke around lib_gsd4t.so (stock).
With verbose logging turned on, I noticed an interesting looking entry.
Code:
Hello EE downloder !!!.
{sgee.samsung.csr.com, instantfix.csr.com}, port : 80
Y3Nyc2xsOmROTkw5NnN1, /diff/packedDifference.f2p3enc.ee, format 2
EE_DOWNLOAD: EE_Download_Init done.
EE_Download_Init - returned 0 !!!.
EE_DOWNLOAD: EE_Download_Start successful.
EE_DOWNLOAD:EE_Download_Scheduler started; server_address=(sgee.samsung.csr.com,instantfix.csr.com), port=80, file=/diff/packedDifference.f2p3enc.ee
...
The string Y3Nyc2xsOmROTkw5NnN1 really stuck out to me. The character set fit in the base64 space which for some reason or another, developers seem to think base64 encoded text is somehow a good way to make things more secure. I have seen this numerous times. To me, it just makes it more noticeable that someone is trying to hide something.
So I went ahead and decoded the string and got
Code:
csrsll:dNNL96su
Just to be sure it wasn't some string unique to my phone, I checked where it most likely came from, which is the lib_gsd4t.so and it is indeed there (@offset 0x1b7429).
What's so special about that string?
I'm almost 100% sure that it is the username : password combo for downloading the SGEE data. I'm guessing it is using a post request (anyone wanting to use wireshark to packet sniff this can confirm) because there are extra parameters being used to retrieve the data.
Have I tried to access the file with those credentials?
No.
Why am I posting this?
I thought it was funny that the username and password are hardcoded in the driver and written to the logs. What's the point of having it password protected if you're just going to tell everyone the account credentials?
My actual job involves application security and I used this as an example for the other programmers on my team as to why we shouldn't ever mistake encoding for encryption and if you try to hide something, chances are you are actually drawing attention to it.
Oh also, is anyone interested in knowing more about the library. I have figured out quite a bit
How odd!
If you've figured out the gps drivers maybe you know how to make an updated file to disable static navigation? I op'd this thread http://forum.xda-developers.com/showthread.php?p=38684789 based on the ics version, but would love an android 422 based mod.
I posted my modded drivers. It may also require new configs.
afrotronics said:
I posted my modded drivers. It may also require new configs.
Click to expand...
Click to collapse
Did you ever figure out the proper request? (curl or wget?)
Some people over at the fairphone.com forum reported a "sensitive" screen. They try to tap on a button (or link) and instead of triggering the button the fairphone starts scrolling. My fairphone also shows this behavior and I tried to find out why. Well, after trying for some time I realized that the shorter I tap on the screen the more likely it happens in a swipe/scroll.
So I enabled the "pointer position" option within the developer tools and shot two screen shots. In the first screenshot I tap for round about 500ms whereas in the second screenshot I tried to tap as short a possible. Like you would click with mouse. It show the error pretty obvious. Any ideas how to adjust that?
Hello
I noticed exactly this behaviour on my Fairphone, too.
That's why I started a thread on the official Fairphone website 22 days ago.
I'm not allowed to post direct links here, so I can give you only the head line here:
"Hyper-sensitive-touchscreen"
And on german Fairphone Freunde forum there's also a thread about this problem
Key-Word:
"Empfindlichkeit-des-Touchscreen"
So far, there is not very much response on these threads, but it seems that not all the handsets are affected, because not all of the answers confirmed the problems. One of the guys on fairphone website sent a request to the support team, a few days ago. Maybe he can forward the answer he gets... I'll ask him in his own fairphone thread - "Sensibility-and-reboots"
Unfortunately my phone broke after just one day, so I'm waiting for a replacement now and can't really offer a solution here...
But during the few hours, my phone worked, I entered the engineering mode (by typing *#*#3646633#*#* in the standard dialler app) and there were many options to manipulate the tuochscreen.
Maybe the more experienced guys here in the forum can work out a solution to solve the problem?!
Thank you in advance!
I have the same "hypersensitive screen" issue
Before I was used to briefly and lightly tapping/touching the screen, but with my Fairphone that often gives a scroll signal.
My developer crosshair option shows short lines, the touchpanel behaves as if I first tapped a few centimers away and then a split second later it registers where I actually touched the screen.
I had to learn to firmly tap and hold, otherwise I couldn't select anything on the screen.
It seems a sofware patch for the touchpanel is needed.
-----------------------------------------------
Fairphone FP1
Caju (v.1.1)
Touchscreen settings
I am copying this from the Fairphone forum, for future reference:
My settings, as copied from engineering mode:
tpd_em_log = 0
tpd_em_log_to_fs = 0
tpd_em_sample_cnt = 16
tpd_em_auto_time_interval = 10
tpd_em_pressure_threshold = 0
tpd_em_debounce_time = 0
tpd_em_debounce_time0 = 1
tpd_em_debounce_time1 = 4
tpd_em_spl_num = 1
tpd_em_asamp = 1
NOTE: Do NOT change any of the values (in this case, under Settings). I do not know what they do, really, and how your device might react! I just report mine, for your comparison.
Just FTR, my device works fine!
Any values different from yours? Then I would suggest reporting the issue to FP while including the link to our discussion here, and on the Fairphone forum. If we can narrow down the source of the problem to be caused by some settings, and not your environment or your specific devices hardware malfunctioning, @benkxda could report this to FP in his next mail.
boondiordna said:
I am copying this from the Fairphone forum, for future reference:
My settings, as copied from engineering mode:
tpd_em_log = 0
tpd_em_log_to_fs = 0
tpd_em_sample_cnt = 16
tpd_em_auto_time_interval = 10
tpd_em_pressure_threshold = 0
tpd_em_debounce_time = 0
tpd_em_debounce_time0 = 1
tpd_em_debounce_time1 = 4
tpd_em_spl_num = 1
tpd_em_asamp = 1
NOTE: Do NOT change any of the values (in this case, under Settings). I do not know what they do, really, and how your device might react! I just report mine, for your comparison.
Just FTR, my device works fine!
Any values different from yours? Then I would suggest reporting the issue to FP while including the link to our discussion here, and on the Fairphone forum. If we can narrow down the source of the problem to be caused by some settings, and not your environment or your specific devices hardware malfunctioning, @benkxda could report this to FP in his next mail.
Click to expand...
Click to collapse
I already put a link on fairphone.com to this XDA thread. Thanks for telling! Well, my settings looks identical to yours. I also played around with them. I have no idea if touch screens nowadays need deboucing or sth like that. So I changed these settings a bit...without improvement though. I am also wondering what tpd_em_log is. It is put to 0. I put it to 1 hoping there is some log written somewhere....but i could not find where unfortunately.
Hey there,
I have the same problem and no solution. But here is my input on that issue. Maybe it helps Fairphone when they investigate that issue, maybe not.
hanzano said:
Well, after trying for some time I realized that the shorter I tap on the screen the more likely it happens in a swipe/scroll.
Click to expand...
Click to collapse
I realized the same thing. BUT in addition, I figured out that it has also something to do with how soft you touch. If I try and touch my screen very very gently, I can reconstruct that behaviour every time. If I press a bit harder, it works better.
I attached a screenshot where I did soft touches, and you see a lot of wiggeling especially in the botom row
Yesterday I was annoyed by this issue. I was a bit in a hurry and the Fairphone touchscreen did not react properly
So I just debugged in Android Studio and this is what I logged:
Code:
12:07:48.874 MotionEvent.ACTION_DOWN: 300.44363, 485.4943
12:07:48.886 MotionEvent.ACTION_MOVE: 293.13342, 499.09888
12:07:48.901 MotionEvent.ACTION_MOVE: 293.45657, 497.48178
...
12:07:49.168 MotionEvent.ACTION_MOVE: 293.45657, 497.48178
12:07:49.183 MotionEvent.ACTION_MOVE: 291.2037, 497.48178
12:07:49.198 MotionEvent.ACTION_MOVE: 290.46213, 497.48178
...
12:07:49.403 MotionEvent.ACTION_MOVE: 290.46213, 497.48178
12:07:49.406 MotionEvent.ACTION_UP: 290.46213, 497.48178
12:07:49.406 event.getDownTime: 566
I tapped for 566ms. Pretty obvious that from ACTION_DOWN to the first ACTION_MOVE there is a big delta of ~14px (is it really pixel?) in y-direction.
Hey there,
probably this does not help anyone, but just for the sake of documentation: due to my headphone-jack issue, my fairphone got replaced by a new one. Now it seems that my sensitive screen issue is gone.
I don't know about how many sources you guys have, but if you have the kernel sources, someone could try to implement a filter (and enable debugging logs in the kmsg ofc) so touches under 400ms (just a value for explanation) are only getting registered as touches, but not as movements. However, this could also have some downsides (pretty fast swipes for example), therefore a sysfs option would be a nice idea
But this would at least be a workaround.
Hyst said:
Hey there,
probably this does not help anyone, but just for the sake of documentation: due to my headphone-jack issue, my fairphone got replaced by a new one. Now it seems that my sensitive screen issue is gone.
Click to expand...
Click to collapse
Hmm, ok.Would you mind doing another sreenshot like you did already? Just in order to see the difference.
laufersteppenwolf said:
I don't know about how many sources you guys have, but if you have the kernel sources, someone could try to implement a filter (and enable debugging logs in the kmsg ofc) so touches under 400ms (just a value for explanation) are only getting registered as touches, but not as movements. However, this could also have some downsides (pretty fast swipes for example), therefore a sysfs option would be a nice idea
But this would at least be a workaround.
Click to expand...
Click to collapse
That is what I also had in mind. I already had a look at Xposed framework trying to find out how to "intercept" global touches. With a normal Android Service it is unfortunately not possible at least what I have read so far.
hanzano said:
That is what I also had in mind. I already had a look at Xposed framework trying to find out how to "intercept" global touches. With a normal Android Service it is unfortunately not possible at least what I have read so far.
Click to expand...
Click to collapse
Xposed is a genious piece of work, however, this should be done via kernel.
Maybe @benkxda could have a chat with Fairphone about that?
hanzano said:
Hmm, ok.Would you mind doing another sreenshot like you did already? Just in order to see the difference.
Click to expand...
Click to collapse
no problem. Here you go!
As far as I am concerned I did the same thing. small fast touches.
although sometimes there is a long line, overall a lot less wiggeling.
Hyst said:
no problem. Here you go!
As far as I am concerned I did the same thing. small fast touches.
although sometimes there is a long line, overall a lot less wiggeling.
Click to expand...
Click to collapse
That looks much better than beforehand. I believe the red lines are not of interest. These just seem to be estimations. I had a look into Android source code com.android.internal.widget.PointerLocationView. The VelocityTracker has an Estimator which is drawn in light red. The MediaTek development tool seems to do it similar. So I would only count the green lines.
But I still think that this is not perfect either. I checked with my old Samsung Galaxy Ace and the Android location pointer which really gives points, no line at all when tapping shortly.
laufersteppenwolf said:
Xposed is a genious piece of work, however, this should be done via kernel.
Maybe @benkxda could have a chat with Fairphone about that?
Click to expand...
Click to collapse
I absolutely agree with you that this should actually be done on kernel/driver level. But I have no idea about Android's kernel structure or any driver layer at all. I used the Android SDK though. And unfortunately MediaTek is not giving all sources for the FairPhone
Where exactly do you expect touches to be evaluated and "forwarded" to Android? Do you have some example code of other phones probably? I am just interested how this works in software.
hanzano said:
I absolutely agree with you that this should actually be done on kernel/driver level. But I have no idea about Android's kernel structure or any driver layer at all. I used the Android SDK though. And unfortunately MediaTek is not giving all sources for the FairPhone
Where exactly do you expect touches to be evaluated and "forwarded" to Android? Do you have some example code of other phones probably? I am just interested how this works in software.
Click to expand...
Click to collapse
Sorry for the late answer, haven't seen you post
Well, kernel sources are quite easily structured, you've got the drivers, in there you find the input drivers, in which you also find the touchscreen drivers. in there are several drivers, you then need to find the correct one (in my case it's THIS file). In there are all functions to make your touchscreen work. This device also has a filter for "ghost" touches, just search for it inside this file
So, if you have located the driver of your device, you can there all needed stuff, such as the filter I mentioned
laufersteppenwolf said:
Sorry for the late answer, haven't seen you post
Click to expand...
Click to collapse
No prob
laufersteppenwolf said:
Well, kernel sources are quite easily structured, you've got the drivers, in there you find the input drivers, in which you also find the touchscreen drivers.
Click to expand...
Click to collapse
Ah ok, got it. In folder alps >> kernel >> drivers >> input >> touchscreen there are 68 files.
laufersteppenwolf said:
in there are several drivers, you then need to find the correct one (in my case it's THIS file).
Click to expand...
Click to collapse
Did you forget the link on "THIS" probably?
laufersteppenwolf said:
In there are all functions to make your touchscreen work. This device also has a filter for "ghost" touches, just search for it inside this file
So, if you have located the driver of your device, you can there all needed stuff, such as the filter I mentioned
Click to expand...
Click to collapse
Vielen Dank! Helps a lot
hanzano said:
Did you forget the link on "THIS" probably?
Click to expand...
Click to collapse
Ooops yeah, I did So HERE you go
Hello @Hyst
In the last week I was discussing with the support team pretty intensively about the touchscreen issue.
Now, they asked me to send them my phone, to see what happens on the device.
But, as I'm working abroad, its not that easy for me, to send it soon.
That's why I suggested, they should ask you, to get the IMEI of your old device - as you offered in the general thread.
Unfortunately Rick de Groot (the support guy) asked me again, to ask you for this number...
A little bit strange, but this is what I want to do now
Can you please send your old IMEI number and the RMA (repair form number) to this email:
<[email protected]>
That would be really great!
PS:
My Name is Florian W. if you want to quote me in your email.
Maybe this helps them to relate your email to my support request.
Thank you in advance!
Holzwurm86
Hi @Holzwurm86
sure thing. I've just send them an email.
Holzwurm86 said:
In the last week I was discussing with the support team pretty intensively about the touchscreen issue.
Now, they asked me to send them my phone, to see what happens on the device.
Click to expand...
Click to collapse
Good to see that there is still progress. The list of phones being affected gets bigger at the fairphone.com forum. If the engineers from Kwamecorp or Changhong need help like debugging or logging touches I am willing to help of course.