Is it possible to get touchpad events without a native activity? - Xperia Play Q&A, Help & Troubleshooting

Is it possible to get events from the Xperia Plays touchpad without a using a native activity?
I don't mind if I have to use native code, just so long as I don't have to get my events from a native activity.
EDIT:
All events are retrieved from a call of ALooper_pollAll.
To make this call you must first call ALooper_prepare which returns an ALooper* looper. Nothing so far requires a native activity. This leads me to believe it maybe possible.
However, I would like to know if anyone knows for sure if this is possible, or has possibly done this before.
EDIT:
I have been trying to make this work, I have it compiling and running but ALooper_pollALL always returns -3, which means the timeout expired. I should at least be able to get touchscreen input from this, which i havn't been able to so far, if anyone can offer any advice that'd be great!
EDIT:
for ALooper to work you have to attach an input queue it, which normally comes from the native activity. Unless there is some way to get it outside of a native activity (looking at the native activity code would probably tell us) or to pass one from java somehow, then this is impossible.

....uhhh....what?
Sent from my R800x using Tapatalk

Mighty Lizard said:
Is it possible to get events from the Xperia Plays touchpad without a using a native activity?
I don't mind if I have to use native code, just so long as I don't have to get my events from a native activity.
Click to expand...
Click to collapse
Wrong section. Questions go in Q&A

I think it's ok for a development question to be here.
AFAIK, the touchpad generate non-standard input events. That's why you need to use a native library. However, I don't know if you HAVE to use a native activity. (I'm talking with zero experience btw) I think you can make a JNI call in a loop, maybe in a separate thread in your program that queries JNI for input data. Again, not 100% sure here, I might look into it when I have time.

AndroHero said:
Wrong section. Questions go in Q&A
Click to expand...
Click to collapse
This is EXACTLY the kind of question that belongs in development. Stop trying to be a rule monger.
Sent from my R800x using XDA App

Mighty Lizard said:
Is it possible to get events from the Xperia Plays touchpad without a using a native activity?
I don't mind if I have to use native code, just so long as I don't have to get my events from a native activity.
EDIT:
All events are retrieved from a call of ALooper_pollAll.
To make this call you must first call ALooper_prepare which returns an ALooper* looper. Nothing so far requires a native activity. This leads me to believe it maybe possible.
However, I would like to know if anyone knows for sure if this is possible, or has possibly done this before.
EDIT:
I have been trying to make this work, I have it compiling and running but ALooper_pollALL always returns -3, which means the timeout expired. I should at least be able to get touchscreen input from this, which i havn't been able to so far, if anyone can offer any advice that'd be great!
EDIT:
for ALooper to work you have to attach an input queue it, which normally comes from the native activity. Unless there is some way to get it outside of a native activity (looking at the native activity code would probably tell us) or to pass one from java somehow, then this is impossible.
Click to expand...
Click to collapse
I remember native and some hybrid method tutorials were available on sony Ericsson website but i'm not at the pc now. Check out test the touchpad post if you can search my posts somehow - it was posted there and on one of the post regarding keyboard replacement. I hope it what you are after - sorry if I misunderstood you or their tutorials.
Sent from my R800i

Related

Question about screen orientation...

So I am really enjoying my Rhodium on the Verizon network and with the help of the "disable push internet" cab, am able to get my free memory to 106mb..Big thanks to the peeps here on the forum. Lots of reading but worth every minute...Anyway..on to my question.....
So I notice when running Google Maps that in order to view in Landscape mode, I have to slide out the keyboard. Simply turning the phone on its side will not activate the "G-Sensor" and it wont flip....this is rather annoying since trying to mount the phone in the open position is much more difficult than when its closed. Is there a way to change this?
Thanks for the site...
I'm not sure if it can be set in google maps itself to use the sensor, but there's software out there (search for gyrator 2 on these forums) that will aloow you to auto-rotate any program based on the use of the g-sensor.
hope this helps
Joe
Thanks Joe,
I should have posted that I was looking for something that would not require the use of 3rd party software, such as a setting in the program or phone somewhere. But I don't think its possible without such software.
I appreciate the response.
ChangeScreen works, too, described here:
http://forum.xda-developers.com/showthread.php?t=466858
I've used it successfully with several different TP2 ROMs.
Edit:
I missed the "without 3rd party software" requirement before I posted
...that rules out 95% of XDA-Developers content...!

[C#]My phone call recorder - some hints needed

Hi.
For my studies I'm expected to develope application which would be able to record phone calls (voice both from mic and speaker). App is for HTC Touch Pro and maybe for Samsung Omnia (but mainly for HTC) and it should be written in C#.
I wrote in my life few CF apps so I know mobile programming topic and I'm not asking for writing application for me. I would like to ask developers who know this topic about few things:
Is it possible to capture voice from mic and speakers while using only CF .NET 3.5 without any specific APIs? Or some additional (phone specific?) APIs are needed? If it is not a problem, can I get few lines of code with description how to do it?
I read few threads here and on other sites but nowhere I can find any information about developing these kind of apps - only posts about which commercial app works on which phone and which is not. So I hope that someone in this development section can help me with this.
I will appreciate any help
Cheers.
No-one? Really?
There are unmanaged APIs which can be used in managed apps by using P/Invoke. Take a look at the 'Wave In' part.
Not sure if this can be easily used for phone call recording.
heliosdev said:
There are unmanaged APIs which can be used in managed apps by using P/Invoke. Take a look at the 'Wave In' part.
Not sure if this can be easily used for phone call recording.
Click to expand...
Click to collapse
Hi.
Thank you for reply. Sample from your link records and plays sounds pretty well, but during phonecall it is completely lost and cannot even save wave properly (and I assume that it is taking control of microphone, because on second phone my voice doesn't exists :/).
I have tried few tricks using openNETCF too, but it also has problems with recording during the phonecall.
Does anyone have any more idea? There are a lot of phonecall recorders which work so somebody must have done this before...

[DEV] Binding CorePlayerService

I am developing simple widget with some music controls on it. I was able to control both Android and HTC music services using bindService(), .Stub.asInterface() and 2 separate IMediaPlaybackService.aidl files (for both packages accordingly). However, I have not succeeded in searching for the .aidl file for Samsung player. It is my understanding that it should be somethig like ICorePlayerService.aidl using ICorePlayerService interface. Since I have not found any, I tried to create my own using the same function names that Android and HTC use; however, it did not work.
Have you any idea how to control Samsung music player from own app? Thank you for your time.
Yes, the name of the site says: xda-developers and yes its an Android Development section, but I guess there arent many people here knowing Android API.. I know a little, but not to that much extent, especially when it comes to proprietary software.
Consider this a shameless bump!
Pure music widget author already did it, so I guess its possible (though he said before that its not).
He did, but I guess I cannot actually ask developer, how to code features of his paid application ).
Then again, why not? It's not like you have anything to lose here...the worst that can happen is that he won't help you.
Well, it has been a long time, and still no reply from the dev :-(. Is there anybody who figured it out?

Researching the Kindle Fire's 'no Amazon Video with root' lock

So it's a bit rubbish that you can't use Amazon Video on your Kindle Fire if it's rooted. I don't want to steal movies, crack DRM or anything else, I just want to have a rooted device to use with my Amazon Prime VOD feature. Bit harsh imho. Sooooo.... I thought i'd have a poke around and see what I could find out.
What I found was a very complex web of protection on a scale above anything i've seen an Android app before. Not only does the application check for root in more that one location (in the application itself and in the native library), it also performs tamper detection on the APK. Not only that but it also checks that the signature on the APK to check that no code has changed (if you change the code in classes.dex and drop it in, this is usually OK on a /system/app file, but not in this case). The code itself doesn't have a single, uniform tamper / root check function, it does it all over the place. Finally, just to make things even more difficult, key parts of the code are pretty heavily obfuscated to make the code hard to analyse / modify.
Despite this, I thought i'd see what I could achieve by patching it piece by piece with the goal of allowing video with root.
The first step was to work out how to get around the signature check. Without sorting this out, the app would immediately flag up as being tampered if I made ANY change to the code. The answer to this was to re-sign the Amazon Video APK, ATVAndroidClient.apk. Of course we don't have the Amazon certificates, so we can sign them with our own, or with SDK certificates. Since Amazon Video uses a shared user id, other APKs need to be signed too. The full list is ATVAndroidClient.apk, KindleForOtter.apk, OtterTutorial.apk, AmazonVenezia.apk, Launcher.apk, Windowshop.apk, CSApp-unsigned.apk, MyAccount-unsigned.apk, amazonmp3-unsigned.apk, Cloud9-unsigned.apk, OOBE-unsigned.apk, com.amazon.dcp.apk, Cloud9SystemBrowserProvider-unsigned.apk, OTASilentInstall.apk, Facebook.apk and OtterAppManager.apk.
After doing this, the next step is to patch out the tamper checks. This can really only be achieved by tracing where the app goes and how it works and by carefully analysing logcat to get clues as to where the errors are happening. Since i'm in the UK I also had to use a DNS proxy with a static IP... I used unblock-us which works a treat. Eventually I got to a stage where I got the application to ignore any tamper detections, thereby enabling the various 'Watch' buttons.
In the next step I could see what something was triggering another problem, and it turned out to be detection of root. This was happening in one of the more obfuscated bits of code, but again with careful tracing I managed to find this and patch it out.
At this point the application was loading, passing tamper checks, giving me the watch buttons, requesting the stream from Amazon and giving me the loading progress bar etc... BUT... the licence request to Amazon continually failed. This is the point where I came to something of a brick wall. It appears that there is some additional root checking going on in the native library, and unfortunately, reverse engineering this is beyond both my abilities and more important the time I have available, so we don't have a fully working solution.
The positive things though are that we now have a patchable Amazon Video APK, which means we can implement the functionality of the 'root keepers' within the app itself. We can effectively make the Amazon Video APK hide the su binary from itself on launch and put it back after it's run it's checks. Not ideal, but might be the best way to go. Note that the root check doesn't care about the Superuser APK, it only checks for 'su'. It checks in all the locations in the PATH variable, so moving it to, say. /system/root and adding that to the path won't help. Unfortunately.
For now, I have to put this on the back burner, but i'm posting my patched APK below so that if anyone wants to pick up the work of reversing the native binary they can do so, simply by using this APK and re-signing it and the other APKs mentioned above.
Any questions, feel free to ask them here. Obviously I have no interest in saving streams, downloading movies or any stupid stuff like that, so don't even ask.
P
DOWNLOAD - MD5: f6044dbeffa4eb3f8361c71a96683150
send to kindle - passage through amazon servers
Apologies if this seems off off topic but I believe it may tied to your explanation of the security at Amazon --
http://forum.xda-developers.com/showthread.php?p=21366426#post21366426
As proof of concept Ive been messing around with the SendtoKindle.exe from the desktop explorer -- and have failed to get anything worthwhile past the amazon servers.... to see if I can use the Send to Kindle to get say, a rom file or binary kernel or apk or something of that sort -- and have not been able to get anything past.
The fact that everything is failing is only making me want to keep trying different things -- which Ill just keep on trying.. so i will try different things -
Ive sent 40 different documents of all kinds to see what goes through and what doesnt... and the only things that are going through are basically legitimate items.
If this is entirely irrelevant to your quest, then my apologies -- but regardless I shall enjoy observing how you shall achieve your success Paul!
Solved. Its hacky, but I've confirmed it working. http://rootzwiki.com/topic/15134-how-to-get-amazon-prime-video-working-with-rooted-stock/
infinitybiff said:
Solved. Its hacky, but I've confirmed it working. http://rootzwiki.com/topic/15134-how-to-get-amazon-prime-video-working-with-rooted-stock/
Click to expand...
Click to collapse
No offense but this has been around for awhile and is known as a workaround. This thread is about finding a solution instead of having to use a workaround I suppose.
Here is an example of a thread posted in November with this information.
http://forum.xda-developers.com/showpost.php?p=19718688&postcount=6
And another thread in December.
http://forum.xda-developers.com/showthread.php?t=1414235
G1ForFun said:
No offense but this has been around for awhile and is known as a workaround. This thread is about finding a solution instead of having to use a workaround I suppose.
Here is an example of a thread posted in November with this information.
http://forum.xda-developers.com/showpost.php?p=19718688&postcount=6
And another thread in December.
http://forum.xda-developers.com/showthread.php?t=1414235
Click to expand...
Click to collapse
Late to the party i suppose
Sent from my SGH-I897 using XDA App
What ROM were you testing on? Even if you temp unroot with RootKeeper on CM7, Amazon Video will not work (in my experience). The Watch button is always greyed out.
Takenover83 said:
What ROM were you testing on? Even if you temp unroot with RootKeeper on CM7, Amazon Video will not work (in my experience). The Watch button is always greyed out.
Click to expand...
Click to collapse
Have you tried force closing the video app and restarting it while unrooted?
Also does video work on CM7? I have not installed it to try.
Sent from my E4GT using xda premium
mkuehn10 said:
Have you tried force closing the video app and restarting it while unrooted?
Also does video work on CM7? I have not installed it to try.
Sent from my E4GT using xda premium
Click to expand...
Click to collapse
Yep, sure did. Something about CM7 that amazon does not like
Takenover83 said:
Yep, sure did. Something about CM7 that amazon does not like
Click to expand...
Click to collapse
I'm sure it's more than just the Amazon video app you will need to get this working...what apps are installed and are they on the system partition. Can you keep us posted on your progress?
B3L13V3 said:
I'm sure it's more than just the Amazon video app you will need to get this working...what apps are installed and are they on the system partition. Can you keep us posted on your progress?
Click to expand...
Click to collapse
There was 3 or 4 apks I had to install. Cant remember all the names off the top of my head. I know some account apk just to sign into amazon, video. I wish I could be more helpful but do not have my Pc in front of me right now (out and about). But the app its self was runing just fine. I Just was being blocked (even though I unrooted.)

[Q] Windows Phone "how to make a Call without permisson from user"21

hi every one;
I need to develop an application which has to make schedualed calls. The problem is it must call without permisson from the user. Also, it must end the call after sometime. Therefore i cant use PhoneCallTask. i heard about Microsoft.Phone.Media.Extended.dll and Microsoft.Phone.InteropServices.dll to use more features of the phone. I downloaded them but i could not add them as referance to the project in visual studio. It says "A referance to a higher version or incompatible assembly cannot be added to the project."
My question is that is there any way to implement such a functionality ("call without permission and end call without any interaction with user." )?
I tried to trigger click event in the shown Meaage Box when we try to call somewhere. However i could not doo it too.
Good news is i will not upload it to the store... It means i do not need it to be certified... Thanks...
mehmet.kahveci said:
hi every one;
I need to develop an application which has to make schedualed calls. The problem is it must call without permisson from the user. Also, it must end the call after sometime. Therefore i cant use PhoneCallTask. i heard about Microsoft.Phone.Media.Extended.dll and Microsoft.Phone.InteropServices.dll to use more features of the phone. I downloaded them but i could not add them as referance to the project in visual studio. It says "A referance to a higher version or incompatible assembly cannot be added to the project."
My question is that is there any way to implement such a functionality ("call without permission and end call without any interaction with user." )?
I tried to trigger click event in the shown Meaage Box when we try to call somewhere. However i could not doo it too.
Good news is i will not upload it to the store... It means i do not need it to be certified... Thanks...
Click to expand...
Click to collapse
This sounds scammy. Closing this. Feel free to PM me with any information to show it is otherwise.

Categories

Resources