Need Help! Remote control of android - Android Q&A, Help & Troubleshooting

Hi everybody!
I"m writing an app,for remote control of android and faced with one problem. I want not to make printscreen of device screen to send it to client,but I'd like to catch comands on drawing inside the system and send copy of them, to make app more quickly. Everybody knew,that there is a large variety of way of drawings, but as I understand at lust there is a special piece of system which get all commands on drawing and draw inside frames? So I would like to know what is it?
Now I found out that SurfaceFlinger allocates a frame buffer for window,but it is not what draws window,so what draws window??

Related

[Q] Interfacing with a java application

I'm developing a touch screen based system for controlling electronic music. As part of the development, we'll be building our own touch screen, but that's not going to be ready for some time. In the mean time, I need to start writing the software (which will be done in java), and I'm going to need a touch screen to use for testing.
So, I am NOT trying to write an application for the Galaxy Tab. I am writing a application that runs on the my desktop, and I'd like it to be able to get touch information from the Galaxy, in any way practical. I've looked into using an iPad for this, but it looks to be too much of a pain to be worth it. All I need is a way of my java application receiving the list of co-ordinates of touches from the tab, in real time. I don't need any higher level gesture interpretation (as I'll have to do that on my end for the final system anyway), just all the touch co-ordinates. Does anyone have a suggestion on the best way to go about this? Is there something in existence already to accomplish this easily, or is there any kind of java library I can use to make calls to a connected tab from my application? I've been googling around, but haven't found any particularly useful information on the subject, as the tab is chiefly meant to be a stand-alone item, not a pc peripheral. Any tips on where I might start looking would be a huge help. Thanks!
-cullam
cullambl said:
I'm developing a touch screen based system for controlling electronic music. As part of the development, we'll be building our own touch screen, but that's not going to be ready for some time. In the mean time, I need to start writing the software (which will be done in java), and I'm going to need a touch screen to use for testing.
So, I am NOT trying to write an application for the Galaxy Tab. I am writing a application that runs on the my desktop, and I'd like it to be able to get touch information from the Galaxy, in any way practical. I've looked into using an iPad for this, but it looks to be too much of a pain to be worth it. All I need is a way of my java application receiving the list of co-ordinates of touches from the tab, in real time. I don't need any higher level gesture interpretation (as I'll have to do that on my end for the final system anyway), just all the touch co-ordinates. Does anyone have a suggestion on the best way to go about this? Is there something in existence already to accomplish this easily, or is there any kind of java library I can use to make calls to a connected tab from my application? I've been googling around, but haven't found any particularly useful information on the subject, as the tab is chiefly meant to be a stand-alone item, not a pc peripheral. Any tips on where I might start looking would be a huge help. Thanks!
-cullam
Click to expand...
Click to collapse
Ok, well I'm going to try and be brief and not turn this into an Android programming essay so here goes.
You have a couple of different routes you can take.
1. If you use eclipse for development and you hook up your tablet, you can watch the log and see that it prints useful information constantly, basically debug output that tells you whats going on in the background. If you just want to look at it, you can probably see it there.
2. This would be my choice, but I'm a programmer so I love a new adventure. I would recommend you just write a quick app for your tablet that pumps out the location of a touch whenever you touch the screen. If you are familiar with sockets and such, you can just write a simple server Java app that collects packets of data from your tablet, and just have the tablet send out a multicast packet containing the coordinates you touch every time you touch the screen.
There are probably some other ways, but if you are already going to be doing the bulk of the project in Java, you aren't looking at a difficult learning curve to write a basic little android app.
Thanks! I'll definitely try the eclipse trick. And yeah, writing an app on the tab is probably going to be necessary, but MUCH easier than having to learn a new language, and get an official license to do one on the iPad. The thing I'm really unsure about is the available communication methods for getting data back and forth between them. I was hoping there might be some sort of java api to get calls going through the usb connection. So I'll guess I'll see what the Eclipse hook up shows me.
cullambl said:
Thanks! I'll definitely try the eclipse trick. And yeah, writing an app on the tab is probably going to be necessary, but MUCH easier than having to learn a new language, and get an official license to do one on the iPad. The thing I'm really unsure about is the available communication methods for getting data back and forth between them. I was hoping there might be some sort of java api to get calls going through the usb connection. So I'll guess I'll see what the Eclipse hook up shows me.
Click to expand...
Click to collapse
apple stuff is crap anyways, leave them to their pretentious commercials and closed minded development.
as far as the android sdk, I think it will take you a lot less time to just use network communications. google socket client/server java tutorials and you should be set to go in about 2 hours. I have implemented it, its all straight forward, and imho probably an easier app to write that something that pumps out of the usb port
Awesome, thanks

[Q] Tasker/Torque Integration

I'm looking for a way to use data from Torque in Tasker.
I want to take data from torque and use it to drive actions in Tasker. Specifically, I'd like to turn the screen on when the engine comes on. Is anyone aware of previous work done in this area that might get me started? Or, would I need to code a Tasker plugin?
I'm aware I could accomplish this using ACC power as the on/off flag, but I'd like to charge the tablet at all times and not just when the car is running.
I know this is an old post but I'm interested in this same thing. My goal is to actually get intake air temperatures onto my pebble watch by passing them from Torque to Tasker and finally to the Pebble.
Hi, so still nothing new *push*
I'd also like to integrate Torque variables into Tasker very much. E.g. disabling the security keyguard as long as the motor is running, enable security when the motor is off. (So you can leave your phone in the car with others whilst refueling...
Any ideas?
Torque and AIDL interface
hunchi said:
Hi, so still nothing new *push*
I'd also like to integrate Torque variables into Tasker very much. E.g. disabling the security keyguard as long as the motor is running, enable security when the motor is off. (So you can leave your phone in the car with others whilst refueling...
Any ideas?
Click to expand...
Click to collapse
Hi
You'll need to use the AIDL 'api' interface that Torque supports to talk to it. Sensors information is retrieved only when it is asked for (and if the data was broadcast over intents, android would probably go slow when you're doing upwards of 100sensors/second refresh rates)
The AIDL interface will be the way forwards to get what you want though (then you can do with it what you want in terms of rebroadcasting if you want) - there's some information on it on here: http://torque-bhp.com/forums/?wpforumaction=viewtopic&t=438.0 which should be enough to get people started
Tasker plugin for Torque Pro
Is anyone working on this? It would be very useful to be able to have Tasker monitor Torque variables and be able to perform actions based on their values.
iraf said:
Is anyone working on this? It would be very useful to be able to have Tasker monitor Torque variables and be able to perform actions based on their values.
Click to expand...
Click to collapse
I've been able to do this following some disperse advice from the web.
Torque
As you see, Torque is able to write a CSV file with selected parameters. All that it basically does is to add a line at the end of that file listing those parameters values. In its settings you can change the frequency of modifications to that file. In my device this file is stored at /storage/emulated/0/torqueLogs/trackLog.csv.
Tasker
Once in Tasker you should set a profile to act on each change done by Torque to it. I've found the profile to be Event > File Modified and to retrieve those parameters inside the file, set up a task that runs the following Shell Command:
tail -1 /storage/emulated/0/torqueLogs/trackLog.csv
This retrieve the last line of the file and stores the output inside a variable. I called it %OBDLOG. A second action inside this task splits this Comma Separated Values (CSV) from that last line using the action Variable Split, and the separator ",". This creates N variables named %OBDLOGN. Example: %OBDLOG1, %OBDLOG2, %OBDLOG3...
Done that, we have to check which value corresponds to the parameter we want.
Bonus Info
You might want to clean this file once it reaches a specific size.
I've done this so that I can say commands through Bluetooth usingTasker Plugin AutoVoice. You can check the logic used by me to say the Coolant Temperature once it reaches 70ÂșC in the attached image.
Sorry not to be able to link outside. XDA prevents me as I'm a newbie! hehe
Cheers!
I'm having trouble finding the trackLog.csv file. I have files in the .torque folder on my sdcard but what options in logging do you have to enable to generate loss in the torqueLogs folder?
Sent from my XT1060 using Tapatalk
Very interesting !!!!
Can you detail all the steps please ?
thanks
Just set up something similar. Setup torque as describer by "dirceucorsetti" above, except I dont use "log rotation".
Below is for tasker.
Profile: Torque
State-Net-BT Near
Name-find your OBD adapter in the list
Min uses regular old BT, so I had to check "Standard Devices"
Enter Task:Start Torque
Exit Task: Stop Torque
Task: Start Torque
App-Launch App-Torque
Task: Stop Torque
Misc-Send-Intent
Action-org.prowl.torque.REQUEST_TORQUE_QUIT
Package-org.prowl.torque
Script-Run Shell
Command- tail -1/storage/emulated/0/torqueLogs/trackLog.csv
Store output in- %OBDLOG
Net-Compose Email
Recipient - your email
Subject - TorqueLog - %DATE
Message-%OBDLOG
File-Delete File
File- torqueLogs/trackLog.csv
Of course you could send the file anywhere. I just wanted to share how I start and stop torque automatically. That seemed to always be the issue.
Interestingly I can also start Waze in this task. I could never figure out how to get taker to detect when I was driving. Until I remembered the OBD adapter.
good info! I started googling about tasker and torque integration not really expecting much result. I want to build a custom interface to run on my in-dash nexus7 that reflects some of the torque info/stats. Thats a good start!
Also found this listing of torque intents and data it logs.
http://torque-bhp.com/wiki/PluginDocumentation
Gator Brah said:
good info! I started googling about tasker and torque integration not really expecting much result. I want to build a custom interface to run on my in-dash nexus7 that reflects some of the torque info/stats. Thats a good start!
Also found this listing of torque intents and data it logs.
http://torque-bhp.com/wiki/PluginDocumentation
Click to expand...
Click to collapse
Not exactly on topic, but do you guys have any idea how to launch a torque plugin from tasker? I'd love to get my racing dash to launch automatically, but I cant seem to figure out how to make that happen.
I would like to see an actual plugin for torque. Just starting to work with it. Would like to use utter to announce things. And autovoice to ask it questions. Never can get torque to tell me its at operating temp. Also looking for any more creative ideas from people. This could be fun.
Sent from my HTC One_M8 using XDA Free mobile app
Getting error "sh: <stdin>[2]: tail: not found" under variables
Sent from my Nexus 7 using XDA Free mobile app
Installed busy box. Forgot since I installed android L. And file was /sdcard/torquelogs.
Sent from my Nexus 7 using XDA Free mobile app
Back at it after updating tablet to "m". I have my 9 variables I want and that keep refreshing. But after I rename them it just replaces it and the renamed variable says at the same number. What am I missing. Also had to change "tail -1" to "tail -n 1" for it to read last line.
Sent from my Pixel XL using Tapatalk

How to mirror transform the andoid screen?

Hey there i might have an odd question. I need to know how I can mirror transform my screen, so left becomes right or up becomes down.
I want to explain you the reason. Im currently working on my PhD, but not in informatics, therefore I'm very bad when it comes to coding. In short words we want to test a driver car interaction, but the interaction system will just be a click-dummy (created with the Axure Program). The click dummy is controled by a PC and mirrored with Teamviewer to an Android phone which functions as an Head-Up-Display. The phone is lying on the dashboard of the car and the reflection on the window works as a head up display.
Because I reflect it to the window it needs to be mirrored (left is right or up is down), because with Axure it is not possible to create dynamic content which is mirrored.
However when I try to find such an application I only find apps that mirror content from PC to android or similar, but they dont mirror the screen itself. Maybe I need to root the phone or maybe there is an easy solution. (btw we use a Samsung Galaxy S4)
If any of you get what I want, feel free to help me explain it in a better way or maybe you can even help me with my problem.
Best regards,
Sophie

[DEV][RESEARCH][DISCUSSION] Amazfit Bip - Alternative Watch Face Sync Method

I have begun reverse engineering mi fit in hopes to come up with a alternative method for syncing watch faces.. the end goal is to create a companion app that will be able to sync watch faces directly to watch.
I wanted to create a thread just in case any other developers/users are interested in contributing any findings and I wanted a location I can post my own findings and take notes.
I recently discovered GadgetBridge, which is open source hurray! I think using GadgetBridge as the base for communication platform is best.. I'm not trying to reinvent the wheel here, pretty much imitate/copy GadgetBridge's methodology of communication with the watch.. if anything dumb it right down and simplify it, keeping only the bare bones required for watch face sync. Hopefully by reviewing the source we can get a crash course on bluetooth communication with smartwatches !
Now that the communication platform is taken care of, we also need to identify how the watch faces are synced. Considering the watch faces are stored as .bin's pretty safe to assume it may just be a simple byte stream over a bluetooth socket ? Speculation at this point, no idea to be honest... no experience with anything like this either. Never messed around with bluetooth apps or anything alike so we shall learn as we go along !
ROADMAP - THOUGHT PROCESS
Bluetooth connection - pairing / initial handshake
Bluetooth communication - the actual watch face sync.
Identify method/function/event of actually syncing watch face - completely unknown at this stage ?
Do we dump the entire .bin over the bluetooth socket or do we need to pick it apart and only send the relevant info ? Really hoping it's a straight dump.. makes sense that it will be. The simpler the better...
Is there a watch face file size limit ? Is there a bluetooth socket communication byte limit ? Any limits that may get in our way ? No idea... guess will find out.
Watch face library - file browser
Support local files - Extract thumbnails from .bin perhaps ?
Support webview - Load remote website(s) ? AmazfitWatchfaces.com perhaps ?
Support saving remote watchfaces to device ?
Anyway that will do for now, hopefully it gets some of you guys thinking and your gears moving..

[Q] How to access and modify display frame/buffer?

I want to be able to intercept a frame that will be displayed to the user and modify it, ideally.
However, if there is a way to access a frame before it is displayed and insert an overlay, then that might be what I'm looking for too.
What I want to do is detect objects(say an apple) on the screen (where ever they might be, in a video that is playing or in a post in Facebook app) and then highlight them.
I'm willing to try anything from creating an app to modifying the source files of a custom ROM.
Is there any way I can achieve this?

Categories

Resources