android - I need help linking an app to another and opening a URL -


i need android application trying make personal use.

i want use adobe flash pro. can make gui, need code makes work.

this intention: when click on button, opens app (vplayer or mx player) , player opens rtmp stream.

basically, want app open url app.

please me this.

thank you.

you can use below code:

assumptions:

  • hope looking code in java.
  • you have imagebutton on screen id imagebutton1
  • you have url ready before calling code.

code explanation:

a reference imagebutton created , on click listener set it. use intent , set url data. now, onclick fire intent handled app on android system capable of handling data.

imagebutton my_icon= (imagebutton) findviewbyid(r.id.imagebutton1);      my_icon.setonclicklistener(new onclicklistener() {          @override         public void onclick(view v) {              intent intent = new intent(intent.action_view);             intent.setdata(uri.parse(url));             startactivity(intent);          }     }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -