Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
260 views
in Technique[技术] by (71.8m points)

java - How to restrict Android device to not open some specific site e.g.youtube, facebook

I am writing an application for Android devices, Now I want to implement the functionality that if my application is installed on the device than it is restricted to open youtube or facebook.

Because this application is for employees and my client do not want that his emplyees waste their time in youtube or facebook. I tried to find some help on google but received no good source.

thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I'm not 100% sure, but you could try creating entries in the /etc/hosts file of the device to redirect the user to another destination. You/your app will need root privileges to edit the file.

Beside the webbrowser(s), don't forget to check if it's possible to use the facebook and youtube apps from the market.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...