android - AOSP : how to get uid of given package name in c? -


i want uid of application, have applications package name , want in c.

are there api returns uid related given package in source? in class , requirements then?

you can in java process.myuid().

on native, can use getuid(), when including unistd.h , sys/types.h.

if want application, use packagemanager , see this answer on so.

in general read unix question uids. , gids


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -