2011-06-13, 10:33
It would be awesome if some universal remote capabilities could be added. I have been following this guid here. The app on android needs to run the php script, fx poweron, so it will poweron my TV. I tried to do this myself by following the helloformstuff on android dev page. But i can't get it to run the php script without the browser opening on the phone. Maybe this is something that will implemented, but if not i would really appreciate it if someone could point me in a direction to make this happen without the browser.
Thanks
Code:
package com.example.helloformstuff;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class HelloFormStuff extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new OnClickListener() {
public void onClick(View v){
startActivity(new Intent(Intent.ACTION_VIEW , Uri.parse("http://192.168.0.4/TV/POWERON.php")));
}
});
}
}
Thanks