Kill Camera App Programmatically on Android -


i looking creating location aware security app whereby camera disabled if phone moves designated location. able disable , enable camera using device administrator class , calling setcameradisabled disable camera. however, problem encountering if setcameradisable method called when camera running, camera app doesn't close. camera app disabled on next launch. such wondering there way me kill camera process before calling setcameradisabled method. in advance.

try

    android.os.process.killprocess(android.os.process.mypid()); 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -