本文整理汇总了Java中com.parse.ParseException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java ParseException.printStackTrace方法的具体用法?Java ParseException.printStackTrace怎么用?Java ParseException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.parse.ParseException
的用法示例。
在下文中一共展示了ParseException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeUserName
import com.parse.ParseException; //导入方法依赖的package包/类
public String computeUserName()
{
ParseUser user = getParseUser("user");
if (user != null)
{
try
{
user.fetchIfNeeded();
return user.getUsername();
}
catch (ParseException e)
{
e.printStackTrace();
}
}
return "N/A";
}
示例2: doInBackground
import com.parse.ParseException; //导入方法依赖的package包/类
@Override
protected Bundle doInBackground(Bundle... bundles) {
Bundle bundle = bundles[0];
ParseUser currentUser = ParseUser.getCurrentUser();
if (bundle.getString(ParseTables.Users.NAME) != null) {
currentUser.put(ParseTables.Users.NAME, bundle.getString(ParseTables.Users.NAME));
}
if (bundle.getString(ParseTables.Users.EMAIL) != null) {
currentUser.put(ParseTables.Users.EMAIL, bundle.getString(ParseTables.Users.EMAIL));
currentUser.setUsername(bundle.getString(ParseTables.Users.EMAIL));
}
if (bundle.getString(ParseTables.Users.DOB) != null) {
currentUser.put(ParseTables.Users.DOB, bundle.getString(ParseTables.Users.DOB));
}
try {
if (currentUser.getSessionToken() != null) {
currentUser.save();
} else {
currentUser.setPassword("todoGenerateARandomString");
currentUser.signUp();
}
} catch (ParseException e) {
e.printStackTrace();
}
return bundle;
}
示例3: convertFileToBitmap
import com.parse.ParseException; //导入方法依赖的package包/类
public Bitmap convertFileToBitmap(ParseFile picFile){
if(picFile == null){
return null;
}
try {
byte[] image = picFile.getData();
if(image!=null){
Bitmap pic = BitmapFactory.decodeByteArray(image, 0, image.length);
return pic;
}
} catch (ParseException e) {
e.printStackTrace();
return null;
}
return null;
}
示例4: getPic
import com.parse.ParseException; //导入方法依赖的package包/类
public Bitmap getPic(){
ParseFile picFile=null;
if(parseEntry!=null){
if(parseEntry.getParseFile("ProfilePic")!=null){
picFile = parseEntry.getParseFile("ProfilePic");
};
}
if(picFile == null){
return null;
}
try {
byte[] image = picFile.getData();
Bitmap pic = BitmapFactory.decodeByteArray(image, 0, image.length);
return pic;
} catch (ParseException e) {
e.printStackTrace();
return null;
}
}
示例5: getPic
import com.parse.ParseException; //导入方法依赖的package包/类
public Bitmap getPic() {
if(triedPostPicFetch){
//If we've already retrieved it before(or got null)
//return the same result
return postPic;
}
triedPostPicFetch = true;
//fetch the picfile from parse
ParseFile picFile = getParseFile("picture");
if (picFile == null) {
//there is no pic for this message
return null;
}
else {
Bitmap result = ImageOperations.bitmapFromPicFile(picFile, 300, 300);
try {
this.pin();
} catch (ParseException e) {
e.printStackTrace();
}
triedPostPicFetch = true;
postPic = result;
return result;
}
}
示例6: getConnections
import com.parse.ParseException; //导入方法依赖的package包/类
public ArrayList<String> getConnections(String username) {
List<ParseObject> ob = null;
ArrayList<String> connectionList = new ArrayList<String>();
ParseQuery<ParseObject> query = new ParseQuery<ParseObject>("Connection");
query.whereEqualTo("username", username);
try {
ob = query.find();
} catch (ParseException e) {
Log.e("Error", e.getMessage());
e.printStackTrace();
}
for (ParseObject connection : ob) {
connectionList = (ArrayList<String>) connection.get("connections");
}
return connectionList;
}
示例7: signup
import com.parse.ParseException; //导入方法依赖的package包/类
private void signup(String usernametxt, String passwordtxt) {
if (!isEmpty()){
int numberParse = 0;
ParseQuery<ParseUser> numberofUsers = ParseUser.getQuery(); // Note to myself : count users in parse class
try {
numberParse=numberofUsers.count();
} catch (ParseException e1) {
e1.printStackTrace();
}
user = new ParseUser();
user.setUsername(usernametxt);
user.setPassword(passwordtxt);
user.put("userID",numberParse+1);
user.signUpInBackground(new SignUpCallback() {
public void done(ParseException e) {
checkSignup(e);
}
});
}
}
示例8: getdata
import com.parse.ParseException; //导入方法依赖的package包/类
private ArrayList<QuotePojo> getdata( String s) {
final ArrayList<QuotePojo> data = new ArrayList<QuotePojo>();
ParseQuery<ParseObject> query = ParseQuery.getQuery("Quote");
query.whereEqualTo("user_id", s);
List<ParseObject> scoreList=null;
try {
scoreList = query.find();
} catch (ParseException e) {
e.printStackTrace();
}
finally {
if (scoreList!=null)
for (int i = 0; i < scoreList.size(); i++) {
data.add(new QuotePojo(scoreList.get(i).getString("quote"), scoreList.get(i).getString("author")
, null, null, 0));
}
}
return data;
}
示例9: getAnimeList
import com.parse.ParseException; //导入方法依赖的package包/类
@Override
public List<Anime> getAnimeList() {
ArrayList<Anime> animeList = new ArrayList<>();
int limit = 10000;
int page = 0;
try {
boolean endReached = false;
do {
ParseQuery<AnimeRecord> query = AnimeRecord.getQuery();
query.setLimit(limit);
query.setSkip(page * limit);
List<AnimeRecord> list = query.find();
if (list != null) {
for (AnimeRecord animeRecord : list) {
Anime anime = AnimeRecord.toAnime(animeRecord);
if (anime != null)
animeList.add(anime);
}
if (list.size() < limit)
endReached = true;
else
page++;
} else
endReached = true;
} while (!endReached);
} catch (ParseException e) {
e.printStackTrace();
}
WriteLog.appendLog(TAG,"Anime loaded from server: " + animeList.size());
return animeList;
}
示例10: refreshAllNotes
import com.parse.ParseException; //导入方法依赖的package包/类
public List<Note> refreshAllNotes(){
ParseQuery<Note> query = ParseQuery.getQuery(Note.class);
query.whereEqualTo("toUser", UserAccount.getInstance().getUser());
query.whereEqualTo("read", false);
try {
newNotes = query.find();
System.out.println("SIZE : " + newNotes.size());
} catch (ParseException e) {
e.printStackTrace();
} catch(NullPointerException n){
}
return newNotes;
}
示例11: checkForNotes
import com.parse.ParseException; //导入方法依赖的package包/类
public List<Note> checkForNotes(){
ParseQuery<Note> query = ParseQuery.getQuery(Note.class);
query.whereEqualTo("toUser", UserAccount.getInstance().getUser());
query.whereEqualTo("read", false);
query.whereEqualTo("isCached", false);
try {
newNotes = query.find();
} catch (ParseException e) {
e.printStackTrace();
}
return newNotes;
}
示例12: update
import com.parse.ParseException; //导入方法依赖的package包/类
public void update() {
try {
for (UserInfo info : users)
info.fetchIfNeeded();
} catch (ParseException e) {
e.printStackTrace();
}
}
示例13: update
import com.parse.ParseException; //导入方法依赖的package包/类
public static void update(){
try {
get().fetchIfNeeded();
} catch (ParseException e) {
e.printStackTrace();
}
}
示例14: deleteUserAndLoginWithPhoneNumber
import com.parse.ParseException; //导入方法依赖的package包/类
@Test
public void deleteUserAndLoginWithPhoneNumber() {
try {
ParseCloud.callFunction("deleteTestUser", new HashMap<String, Object>());
} catch (ParseException e) {
e.printStackTrace();
}
loginWithPhoneNumber();
}
示例15: getDevices
import com.parse.ParseException; //导入方法依赖的package包/类
/**
* Get all bootstrap Checkins that exists on Parse.com
*/
public List<Device> getDevices()
{
//return getDeviceService().getDevices().getResults();
ParseQuery<Device> query = ParseQuery.getQuery("Device");
try
{
return query.find();
}
catch (ParseException e)
{
e.printStackTrace();
}
return null;
}