Skip to main content

Posts

Showing posts with the label button

Start video chat without user interaction - Android

I am a total noob on this site so please be patient. I am trying to initiate a Video Chat/Call without any user interaction or confirmation. I found this: Uri imUri = new Uri.Builder().scheme("xmpp").authority("gtalk").query("call;type=video").appendPath(email).build(); Intent IM = new Intent(Intent.ACTION_SENDTO); IM.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); IM.setData(imUri); startActivity(IM); from here: http://stackoverflow.com/a/8024626/1184256 This gets me very close, but I then have to click an "Invite" button to continue. Is there a way I can emulate a KeyEvent to click this button or skip the popup window entirely with root access? I don't even necessarily need to use Google Video Chat if someone has found a different way to initiate a Video call to a certain contact via Skype, Vtok,Fringe, ooVoo or whatever without user interaction. I have also found OpenTok which after building a sample server and client on my site I

Eclipse: Android Soundboard buttons are "overclickable”

In my android soundboard, all of the buttons work perfectly and the sounds play normally, but there is a problem. The problem is that when you press a button in the app, you can press other buttons. For instance, if the button I press plays a siren like noise, I can press another button and both sounds will play at the same time. This is not what I want. Is there any code I can add to make it so that I can click only one button at a time, or some code that makes the previous sound stop and it will play the newly selected sound?

Java Jframe centers my buttons ):<

Here is my code: public class Main { public static void main(String[] args){ JFrame frame = new JFrame("Vex Development Studio 2.0"); frame.pack(); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocation(10,10); //make variables File newproject; Container content = frame.getContentPane(); GridBagConstraints gbc = new GridBagConstraints (); Dimension buttonsize = new Dimension(75,25); Button about; about = new Button("About"); about.setPreferredSize(buttonsize); //add content content.setLayout(new GridBagLayout()); content.setBackground(Color.white); gbc.gridx = 0; gbc.gridy = 0; content.add(about,gbc); //main stuff //about button about.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ae){ JOptionPane.showMessageDialog(null, "Example", "About", 1); } }); //some extra crap frame.setSize(700, 500

android fragments edittext button focus

being new to android app development, I encounter a problem regarding the interaction of android fragments, edittexts, focus and buttons. I have one fragment activity with several tabs. Most tabs have one fragment each. But in one tab, I have a ListFragment and a fragment with edittexts and buttons, which I call edit fragment. When the user selects a list item, the content of the edit fragment is shown in the current tab. When trying to edit a text there, more precisely, when hitting a different key than the backspace key, the new char is not shown, but the first button below gets the focus. Why? And how can I avoid this behavior? Earlier, I had a different activity for the edit fragment and the editing worked perfectly. But for other reasons and because it is recommended, I have only one activity now. Thank you for help! The xml for project_details1: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.andr

i want to play two files one after another on a single click of Button [closed]

i want to play two files one after another on a single click of Button.Files are in assets folder . if (play) { mp.stop(); mp.release(); mp = null; } btn1.setImageDrawable(getResources().getDrawable(R.drawable.key1)); mp = new MediaPlayer(); try { descriptor = getAssets().openFd("c1.mp3"); descriptor1 = getAssets().openFd("d2.mp3"); mp.setDataSource(descriptor.getFileDescriptor(), descriptor.getStartOffset(), descriptor.getLength()); mp.prepare(); mp.start(); mp.setDataSource(descriptor1.getFileDescriptor(), descriptor1.getStartOffset(), descriptor1.getLength()); mp.prepare(); mp.start(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } play = true

How to add a text under the image button in Android?

I want to add text under a image button, which are also clickable, and will be redirected to the same activity as the image button. basically it's like the app list in any android phone, e.g.