Sending the Key Strokes - C++ or Other Android Development Languages

Code:
using System.Windows.Forms;
Code:
SendKeys.Send("T");
This will send T keystring to the focused application. BTW you can find more in MSDN.
I recently found out this

SendKeys.Send("{ENTER}");

Related

Help with scanner object

I no I should post in some java forum but I don't know any and I need to get this program done by tonight
I want to reuse a scanner object that I have already used, so in this case I used the nextLine() method but know I want to use the next() method on the original input, so if the console input was "hello xda" I want to use the nextLine method to the whole line, and the next()method to just get the first part
Basically is their anyway I can reuse a scanner object twice on the same input
Sent from my SGH-T959 using XDA App
There's probably a simpler way but maybe just assign the your scanner input from the nextLine() method to two different strings and run next() on the other one to get the first token.
I got the first word into a string by using the substring method but I still have the original problem because I need to use the hasNext() to see if the user inputs 2 or 3 words
Thanks for the help
Sent from my SGH-T959 using XDA App

[APP] Caesura remote administration/ parental control/practical joke app BETA R1

Hey everybody, I am posting this here cause I just built a new parental control, remote administration and practical joke app for Android called caesura. Caesura is a remote administration app that allows an Android phone to be controlled via SMS messages, in much the same was as one can post to Facebook via SMS.
By sending the !login command to the phone in question and then texting back the password, you can signal the phone to start listening for commands. These commands include panic (turn up the volume all the way and ring and flash lights to help find lost phone), status (find out how much battery life the phone has left and get other info), contacts (in case you forgot your phone at home, u can still access your address book), block (block all SMS messages from specified number, useful for parental control),.and many more.
Like I said, this is just a beta so I'm open to any suggestions
The app can be downloaded from this page on my website:
http://www.gundersoft.com/pages/downloads/caesura
As of yet this work is beta...it doesn't have decent instructions...these are forth coming. For now, the three commands you need to know are as follows: !login logs in to the remote phone. Help command (replace command with the name of a command you need help with) gives help related to command usage, and exit logs you out of the remote phone. Make sure you always use the exit command when finished! You cannot send any texts to the remote phone from the phone you used to control it while logged in.
for a list of the available commands, use the "login to another phone" button to control the phone instead of SMS. In this console there is a drop down menu containing all of the commands.
Finally, for the sake of research, every copy of this app "calls home" the first time it launches to register the version number so I can keep track of roughly how many of each version of caesura out in the wild lol.
Tell me what you think of all of this!
Sent from my MB860 using XDA App
Need to move this to the apps forum. This is the rom development forum. I will give this a try though, thanks for sharing.
Sent from my MB860 using xda premium
Oops, Sorry
Sent from my MB860 using XDA App
ur android market link is not working
https://market.android.com/developer?pub=Gundersoft+Studios

[Q] Send data from Tasker using the Share feature

Trying to make Tasker automatically open and populate Astrid todo's task edit fields the way that so many other apps can using the Share menu. With pretty much any app being able to do this using Share, I figured it wouldn't be too hard to make Tasker do the same, but I'm having trouble finding out how.
I'm using the beta of Tasker so Send Intent replaces the previous two intent actions. The fields available are Action, Category, Mime Type, Extra, Package, Class, and Target. Right now Package is set to com.timsu.astrid and Class to com.todoroo.astrid.activity.TaskEditActivity, which manages to open the task edit screen. That intent is however from the Astrid widget so I don't know if that's even the right thing to use if doing this via the Share ability.
I'm not a dev so doing this blindly. Any help would be appreciated
Hi, did you manage to get this to work?
I stopped using Astrid ages ago. Compared to what I built from scratch using Tasker, it's **** for my use

Tasker help question?

I have my work wifi which to fully connect to it I have to open a browser and basically click a connect button to be fully connected, is there a way to automate this in tasker?
Sent from my Galaxy Nexus using Tapatalk 2
I wrote one answer below. It's still an option, but you may be better investigating this first....
Under "Net," there are HTTP-Get and HTTP-Post actions. I'm not an HTTP expert, but I would suggest dissecting the gateway webpage to see if you can use these actions to get through.
------------- First thought ----------------------------
Is your device rooted?
If yes, then you might try the "Type" action in the Input actions. The documentation is very limited, so I don't know what you can and can not generate. I'm automating websites on Windows using Autohotkey, and Enter is the "best" character for hitting website buttons. I don't know if you can generate special characters from the Type action.
Detecting when to issue the Type action is another matter. A timer delay is simple to do, but "dumb" with respect to the website status.
Thanks for the reply I'll look at dissecting the the page.
Sent from my Galaxy Nexus using Tapatalk 2

[Q] Whisperpush by Cyanogenmod

The latest update to CM10.2 on Xperia U today, brought the whisperpush. I googled it. basically there is no clear instruction or no elaboration on how to set this feature up or what this feature actually does. Someone knows anything about it?
mukul1233 said:
The latest update to CM10.2 on Xperia U today, brought the whisperpush. I googled it. basically there is no clear instruction or no elaboration on how to set this feature up or what this feature actually does. Someone knows anything about it?
Click to expand...
Click to collapse
I got this from CM11 and Gapps are needed to get it work, so I didn't got it working.
Got this from the CM site, too clear for me.
In July, Koush announced that CyanogenMod would be seeing integrated, system-wide secure messaging integration with compatibility with TextSecure. For those unfamiliar, TextSecure is an open-source cross-platform (iOS and Android) client that encrypts your SMS messages both locally, and over the air when sending to other TextSecure users. The application is maintained by Open WhisperSystems, and lead engineer Moxie Marlinspike.
Click to expand...
Click to collapse
When I use a vanilla Android 4.3 together with Textsecure and send a text message to a registered Whisperpush system (Cgm Kitkat) with gapps. Nothing seems to happen. It should be compatible right?
Via Android & Tapatalk 2.
rigelq said:
When I use a vanilla Android 4.3 together with Textsecure and send a text message to a registered Whisperpush system (Cgm Kitkat) with gapps. Nothing seems to happen. It should be compatible right?
Via Android & Tapatalk 2.
Click to expand...
Click to collapse
Did you get it working? According to what I found in my searches it should be compatible. But up to now, all my tries sending encrypted messages between CM10.2 with Whisperpush and a non-rooted mobile with TextSecure fail. Any hints?
There doesn't appear to be any documentation other than the API description and one blog post about it. I had no luck making it work. The TextSecure app itself works fine for me - it works, as far as I can tell, by becoming the default SMS app and thus getting all incoming SMSes and sending all outgoing SMSes, so that it's able to negotiate keying with the partner.
The integration of WhisperPush in CM11 appears to be designed to make it so you don't need to use a specific SMS app, instead intercepting SMS messages at a lower layer and doing keying negotiation there, so that the user-facing app doesn't need to deal with the specifics. I also read somewhere that CM runs their own WhisperPush server distinct from the one used by the TextSecure app, but that the servers are federated so that clients of one should be able to interact with clients of the other.
However, when trying to exchange messages between a TextSecure phone and a CM11 phone, they clearly don't negotiate anything. When sending a message from the CM11 phone, the TextSecure phone receives the plaintext SMS message immediately; it never receives a negotiation message nor is there a way to ask the CM11 phone to initiate a secure session. In theory the middleware layer could discover that the destination phone number has registered itself with the server(s) and automatically try to initiate a secure session without being asked to, but it never did this while I was experimenting with it.
When sending a message from the TextSecure phone to the CM11 phone using the TextSecure app, there is a "Initiate" button by which you can explicitly ask it to initiate a secure session. When you do this, it sends a negotiation message to the CM11 phone in order to set up the session. However, on the CM11 phone, this message is received as a plain text SMS and just displayed - it isn't intercepted by the middleware and thus the session does not get set up and CM11 never adds the other contact's key to its contact key list.
So I'm guessing part of it just hasn't been written yet. I struck out completely on trying to even find a place to discuss or ask questions about this, so I'm posting it on this thread in the hopes someone will find it while searching for the same problem and have some ideas. I don't get the impression the authors, either on the CM or WhisperSystems sides, want to hear from end users who just can't figure out how to make it work. Unfortunately I have only a very rudimentary grasp of java and android app development, and quickly got lost trying to understand the source code, though I do think it's great that it's there.
I think it would be awesome if there were some software similar to this but that "just worked" to the extent that naive end users could be using it by default without having to do much of anything to get it working - maybe some day.
epv.
I made the same observation. I could not successfully establish an encrypted connection between a whisperpush-enabled CM-device and a non CM-device with text secure. Nor did I find any information on the web regarding this.
A shame, I think this would be a really interesting feature of CM. At least, I'm not the only one who doesn't get it working...
The worst part is apparently there is no way to unregister from cm's Whisperpush servers which entails that you cannot register onto textsecures whispersystem servers. Therefore if you are running cm and want the push services from the textsecure app well then you are **** ouf of luck apparently for the moment. The whole process is supposed to be seamlessly and transparent but it seems to be becoming more of a burden which is sad because i love the concept they are trying to pitch. I guess cm kinda ruined it when when their servers were distinct from and textsecures whispersystems and failed a devlivering a notifaction when you are actually in a encrypted enviremoent. All my searches for a solution to my dilemma led me here hence why i am posting my thoughts where i guess more willing users should be able to act upon this problem.
I used the last days TextSecure on top of CM, which worked for me via SMS. Before the latest update, I did not get any registration from TextSecure. My hope was now, that after the update it might work, but I did not yet have time to try. I'll test it this evening, but you're not putting my hopes high.
I am facing the same problem. Does anybody have a solution yet? :crying:
How to contact Cyanogenmod, so my number can be deleted?
kyuubie said:
The worst part is apparently there is no way to unregister from cm's Whisperpush servers which entails that you cannot register onto textsecures whispersystem servers. Therefore if you are running cm and want the push services from the textsecure app well then you are **** ouf of luck apparently for the moment. The whole process is supposed to be seamlessly and transparent but it seems to be becoming more of a burden which is sad because i love the concept they are trying to pitch. I guess cm kinda ruined it when when their servers were distinct from and textsecures whispersystems and failed a devlivering a notifaction when you are actually in a encrypted enviremoent. All my searches for a solution to my dilemma led me here hence why i am posting my thoughts where i guess more willing users should be able to act upon this problem.
Click to expand...
Click to collapse
Same problem here... any solutions now?
IceTi said:
Same problem here... any solutions now?
Click to expand...
Click to collapse
I haven't tried it yet but this workaround seems to be successful for a few users. http://forum.cyanogenmod.com/topic/87482-critical-flaw-in-whisperpush/ .This discussion seems to be relevant to a bug report that's been going on with cm and someone seems to have come up with a smal hack that requires adb and cURL.
"I just unregistered using adb. For completeness, this is the complete sequence of what I did:
Phone:
- Developer options
- Root access -> Apps and ADB
- ADB over network -> check
PC:
$./adb connect <device ip>
$./adb shell
Phone:
$ su
# cat /data/user/0/org.whispersystems.whisperpush/shared_prefs/org.whispersystems.whisperpush_preferences.xml
# exit
$ exit
At some point the phone will ask if you want to give permission. Remember to reset the Developer options settings when done.
The printed contents from fields "pref_registered_number" and "pref_push_password" must be copied in the curl line below:
PC:
$ ./adb disconnect
$ curl -v -k -X DELETE --basic --user $pref_registered_number:$pref_push_password https://whisperpush....1/accounts/gcm/
Relevant response from curl:
[...]
* Server auth using Basic with user '<phone number>'
> DELETE /v1/accounts/gcm/ HTTP/1.1
> Authorization: Basic <some key>
> User-Agent: curl/7.33.0
> Host: whisperpush.cyanogenmod.org
> Accept: */*
>
< HTTP/1.1 204 No Content
Now wait for, say, 30 minutes and try registering TextSecure. For me this worked." by storm49152
EDIT: I can confirm that this method worked for me, currently unregistered from cm's whisperpush systems and registered now with texsecure's Open whipser systems.
Confirmed working.
ADB isnt needed, only this file. Can be opened in Root Explorer too.
I had to use curl on my linux machine, as curl on Win 7 was not supporting https.
Yeah, worked for me too!
Just tried with cm's WhipserPush and non-cm TextSecure. I had to reregister on my cm device and now it works :laugh:
But I don't get delivery reports, I don't have group chat and picture was not received...
I'm still on CM10.2.1 Does anybody know if this is solved in CM11?
Now I also use TextSecur App, as I want to have group chat and possibility to send pictures. First had to disable privacy guard. It stopped TextSecure from catching the verification SMS. Deregistered like described above.
For those who need a fix for this and aren't on the phone they registered with, I've written a Ruby script to fake a registration and use that registration to unregister all devices associated with the number. You'll need to be able to receive a text message to the number you want to unregister, but for legitimate use that shouldn't be a problem.
https://github.com/daveio/whisperpush-unregister
Hello I own a Nexus 4 and I can't unregister from CyanogenMod Whisperpush. I tried everything : the Ruby script, the official way from Cyanogen's privacy settings, the adb way;I also tried to flash the last nightly but every time I try to register within the TextSecure app it shows the same error message. Can you please help me in this?
Thank you
Inviato dal mio Nexus 4 utilizzando Tapatalk

Categories

Resources