I am sorry I was not clear. I am interested in getting content that is assigned to a specific group in my organizational account and therefore I have two options. These are OAuth 2.0 authentication and app login. The only reference I can find is at Use OAuth 2.0 authentication—ArcGIS Runtime SDK for Java | ArcGIS for Developers . But, looking at the Quartz java API reference I can only find a class called Credentials for portal. In it, there is a setCredential from json string something like the code below. I am wondering if this is the way to use the client id and client secret for an app to login to AGOL to get secured content. If it is, I need to know how to format the json string so I can automatically get content. If this is not the way to do it I need some guidance.
I want to create an offline/online app but the content that get delivered to the application has to be secure and from AGOL. Any help is appreciated.
final Portal portal = new Portal("http://www.arcgis.com", true);
portal.setCredential(Credential.fromJson("")); /
Thanks,
Tom