I need to get the time of phone pickup and time of usage after the pickup and drop.
DeviceActivityData.ActivitySegment -> a struct contains all these information.
Where and how can i access these information?
let v = DeviceActivityData.ActivitySegment().totalActivityDuration
ERROR:
'DeviceActivityData.ActivitySegment' cannot be constructed because it has no accessible initializers
How do I initialise DeviceActivityData?
Post
Replies
Boosts
Views
Activity
I wanted to use deviceActivity target (File->New->Target). A package was created with filename "TotalActivityView".
But i am getting this error while trying to preview it.
ERROR:
Cannot preview in this file
".appex is an unsupported extension"
How do I use the deviceActivity target in my project?
Is it possible to run the app in the background even though the user has completely closed it?
I want to fetch device activity every 15 mins.
Is this possible to fetch even though the app is completely closed?