How to start via Intent?

599 views
Skip to first unread message

_a_v_s

unread,
Jan 12, 2011, 8:17:21 PM1/12/11
to android-vnc-viewer
I saw in the change logs that some modifications were made to be able
to launch the VNC client via an intent, but I didn't see any
documentation on how to go about this? I'm writing an application,
where I would like to be able to launch the VNC client, where I can
pass in the password, ip address, etc...

Any help would be greatly appreciated... THANKS!

Nito

unread,
Apr 9, 2012, 10:23:41 AM4/9/12
to android-v...@googlegroups.com
This is how I start it

String cmd = "vnc://myserver.example.com:5900/C24bit/MYPASSWORd"
Intent vncIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(cmd));
vncIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(vncIntent);

kruemelnerd

unread,
May 23, 2012, 12:38:12 PM5/23/12
to android-v...@googlegroups.com
Hey Guys,
have some Questions about the intent and couldn´t find anything about it in the wiki.

The example below doesn´t work for me. 
Found out it had to be at least: 
vnc://<ip-address>:<port>/<Colormodel>/<username>/<userpassword> 
Colormodel: C24bit, C256, C64, C8, C4, C2;

Then the App doesn´t crash. But couldn´t log in. Just says: "VNC connection failed! Authentication failure".
Can someone help me and tell me the correct intent to log in?
Thank you very much.

Nito Martinez

unread,
May 23, 2012, 1:25:36 PM5/23/12
to android-v...@googlegroups.com, kruemelnerd
Hi,

I am using it in Xvnc, and it works well:

My string is this:

vnc://localhost:5900/C24bit/password

See: http://theqvd.com/trac/browser/releases/android-xserver-1.4/eclipse/src/com/theqvd/android/x/XserverService.java


Function launchVNC()

String cmd = Config.vnccmd; // This is
vnc://localhost:5900/C24bit/password
Log.i(tag, "launching intent:"+cmd);
Intent vncIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(cmd));
vncIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(vncIntent);


Hope this helps,

Nito
--
You received this message because you are subscribed to the Google Groups "android-vnc-viewer" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-vnc-viewer/-/oW76nU2JsbsJ.
To post to this group, send email to android-v...@googlegroups.com.
To unsubscribe from this group, send email to android-vnc-vie...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-vnc-viewer?hl=en.

-- 
Benito Martinez <Benito....@Qindel.ES> Mov:+34678476906
url: http://www.qindel.es jabber: xmpp:ni...@qindel.com
Qindel

Philipp Veit

unread,
May 23, 2012, 1:54:04 PM5/23/12
to android-v...@googlegroups.com, kruemelnerd
Ha yes it helped :)
Really simple:
I got confused with the Colormodel in your String. Thought that was a Username.
So the String has to be:
vnc://<ip-address>:<port>/<colormodel>/<password>

really simple.
Thank you very much :)
To post to this group, send email to android-vnc-viewer@googlegroups.com.
To unsubscribe from this group, send email to android-vnc-viewer+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/android-vnc-viewer?hl=en.

Aditya Thakare

unread,
Jan 8, 2013, 5:50:37 AM1/8/13
to android-v...@googlegroups.com, kruemelnerd
This works for me too...

THANKS :)
To post to this group, send email to android-v...@googlegroups.com.

To unsubscribe from this group, send email to android-vnc-viewer+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-vnc-viewer?hl=en.

e.fia...@gmail.com

unread,
May 10, 2013, 6:46:22 AM5/10/13
to android-v...@googlegroups.com
Hello,

With your exemple I would like to start a connection with am command.
I try this :

[CODE]
# am start -a android.content.Intent.ACTION_VIEW -d vnc://localhost:5900/C24bit/toto
[CODE]

but this not working.
I will try to search the log, but if you could make me on the good way, it will be nice.
Thx

Emmanuel
Reply all
Reply to author
Forward
Message has been deleted
0 new messages