but all about inspiring and enlightening others about a topic At work, one may find a guide or mentor, but at the end everything depends on self-learning 2
or null values ‣ Should I init on main thread or worker thread? ‣ Ask client to have your declarations in their manifest ‣ Encapsulation is not just for theory Difficult to misuse!
Collections.unmodifiableList(list); return list; ‣ Methods taking int or null values ‣ Should I init on main thread or worker thread? ‣ Ask client to have your declarations in their manifest ‣ Encapsulation is not just for theory
initialization, config etc ‣ Fluent interfaces ‣ Allows values like keys to be set via manifest metadata ‣ Create extendable APIs for more advanced control ‣ Provider both sync and async versions of methods, if applicable Use popular patterns!
‣ Get core functionality/architecture VERY right ‣ Tip: Start your process with 2-3 page of top level documentation and get it validated ‣ Should be easy to evolve Solid beginning is necessary
@MainThread public void signUp(@NonNull User user, Callback<User> callback) { Validate.notNull(user, "user"); ............. Auth.signUp(user, userCallback); } What if client change this user in middle of something?
permissions for client app without clearly specifying ‣ Make sure your lib’s third party dependencies don’t add extra unnecessary permissions ‣ Analyze manifest of final APK via AndroidStudio ‣ Force remove if not necessary <uses-permission android:name="android.permission.USE_CREDENTIALS" tools:node="remove" />