Posts

Showing posts with the label app

Check whether an app on debug mode.

Here is a simple method to check whether an app is on debug mode or not. This will be useful to check to enable Strict Mode or to disable Strict Mode. public static boolean isDebugMode(Context context) {               PackageManager pm = context.getPackageManager(); try {              ApplicationInfo info = pm.getApplicationInfo p (context.getPackageName(), 0);               return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; } catch (NameNotFoundException e) { }              return true; } And to enable Strict Mode, StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectAll() .penaltyLog() .penaltyDialog() .build()); The above code will detect all types of network and disk I/O. Very helpful for debugging.

There was a problem saving your changes. Please try again later.

There was a problem saving your changes. Please try again later. When I try to save settings of my facebook app. I got the above error. It occurred when I try to save Secure Canvas URL field. And then I used port number of 443 with my url. For example if my Secure Canvas URL is  https://dl.dropbox.com/u/38102629/index.html?  I added port number and my canvas url is  https://dl.dropbox.com :443 /u/38102629/index.html? And error went away.