0
\$\begingroup\$

Currently to open the link i am using button sprite. But now i want to link a text to website. Is there any way to do this in AndEngine?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Make the link clickable and then go to url using intent.

      Text link = new Text(100, 100, this.mFont, "Link", this.getVertexBufferObjectManager()){

            @Override
    public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {
          switch(pSceneTouchEvent.getAction()) {
          case TouchEvent.ACTION_DOWN:
               Intent i = new Intent(Intent.ACTION_VIEW);
               i.setData(Uri.parse("http://www.google.com"));
               startActivity(i);
                  break;
          }
                        return true;
        }
            };
\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.