• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Disable factory reset

Your device's internal storage is divided into several partitions. Most of them are restricted with system-level permissions and one is set to be the user's data partition. The installed Android operating system is on those system partitions and as a general user you only have very limited access to any of them. (Most indirectly via the Settings app.) You do have full, unfettered access to anything residing in that data partition. When you rooted your device, this gives you more ability to access the operating system.
But again, a Factory Reset only wipes that user data partition clean. It does not have any access to any of those system-level partitions and it doesn't have the ability to the alter the installed operating system either. But as you use that device more and more, you build up a lot of things in that user data partition. Config and setting files for your apps get stored there along with general files too. So doing a Factory Reset is something of a drastic measure, but it cannot restore deleted apps, it cannot change a rooted device back into a non-rooted one, nor will it return a phone that's been upgraded to a newer OS version to a previous one.
A 'Factory Reset' is something of a misnomer as implies it can magically restore a phone to its original state but that's just not reality. The 'Reset' part only refers to an established user's files and settings.


Just a suggestion but you might find installing the Titanium Backup Pro app to be helpful:
https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup
https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackupPro
also, Root Explorer is a really good 'root required' file explorer app:
https://play.google.com/store/apps/details?id=com.speedsoftware.rootexplorer&hl=en_US
Thanks!!!

How do I get the categories class to transition to subcategories class

Hi

I'm currently using fragments to create a category screen and ranking screen, however, I now want to add subcategories to the categories when clicked, however now upon clicking a category now I get this error

(Unable to instantiate activity ComponentInfo{com.example.educat/com.example.educat.SubCat}: java.lang.ClassCastException: com.example.educat.SubCat cannot be cast to android.app.Activity)

The categories class currently fetches the categories from firebase and lists them, I now want on click of a category to take the user to subcategories also fetched from firebase.

Any help would be appreciated.

public class CategoryFragment extends Fragment {

View myFragment;

RecyclerView listCategory;
RecyclerView.LayoutManager layoutManager;
FirebaseRecyclerAdapter<Category, CategoryViewHolder> adapter;
FirebaseDatabase database;
DatabaseReference categories;

public static CategoryFragment newInstance(){
CategoryFragment categoryFragment =new CategoryFragment();
return categoryFragment;
}
@override
public void onCreate(@nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
database= FirebaseDatabase.getInstance();
categories = database.getReference("Category");


}
@nullable
@override
public View onCreateView(@NonNull LayoutInflater inflater, @nullable ViewGroup container, @nullable Bundle savedInstanceState) {
myFragment = inflater.inflate(R.layout.fragment_category,container,false);
listCategory = (RecyclerView)myFragment.findViewById(R.id.listCategory);
listCategory.setHasFixedSize(true);
layoutManager = new LinearLayoutManager(container.getContext());
listCategory.setLayoutManager(layoutManager);
loadCategories();

return myFragment;
}

private void loadCategories() {
adapter = new FirebaseRecyclerAdapter<Category, CategoryViewHolder>(
Category.class,
R.layout.category_layout,
CategoryViewHolder.class,
categories
) {
@override
protected void populateViewHolder(CategoryViewHolder viewHolder, final Category category, int position) {
viewHolder.category_name.setText(category.getName());
Picasso.with(getActivity())
.load(category.getImage())
.into(viewHolder.category_image);
viewHolder.setItemClickListener(new ItemClickListener() {
@override
public void onClick(View view, int position, boolean isLongClick) {
Intent startGame = new Intent(getActivity(),SubCat.class);
Common.categoryId = adapter.getRef(position).getKey();
Common.categoryName = category.getName();
startActivity(startGame);

}
});
}
};
adapter.notifyDataSetChanged();
listCategory.setAdapter(adapter);
}

public class SubCat extends Fragment {

View myFragment;

RecyclerView listCategory;
RecyclerView.LayoutManager layoutManager;
FirebaseRecyclerAdapter<Category, CategoryViewHolder> adapter;
FirebaseDatabase database;
DatabaseReference categories;

public static CategoryFragment newInstance(){
CategoryFragment categoryFragment =new CategoryFragment();
return categoryFragment;
}
@override
public void onCreate(@nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
database= FirebaseDatabase.getInstance();

categories = database.getReference("Subcategory");
}

@nullable
@override
public View onCreateView(@NonNull LayoutInflater inflater, @nullable ViewGroup container, @nullable Bundle savedInstanceState) {
myFragment = inflater.inflate(R.layout.fragment_category,container,false);
listCategory = (RecyclerView)myFragment.findViewById(R.id.listCategory);
listCategory.setHasFixedSize(true);
layoutManager = new LinearLayoutManager(container.getContext());
listCategory.setLayoutManager(layoutManager);
loadCategories();

return myFragment;
}

private void loadCategories() {
adapter = new FirebaseRecyclerAdapter<Category, CategoryViewHolder>(
Category.class,
R.layout.category_layout,
CategoryViewHolder.class,
categories
) {
@override
protected void populateViewHolder(CategoryViewHolder viewHolder, final Category category, int position) {
viewHolder.category_name.setText(category.getName());
Picasso.with(getActivity())
.load(category.getImage())
.into(viewHolder.category_image);
viewHolder.setItemClickListener(new ItemClickListener() {
@override
public void onClick(View view, int position, boolean isLongClick) {
//Toast.makeText(getActivity(),String.format("%s|%s",adapter.getRef(position).getKey(),category.getName()),Toast.LENGTH_SHORT).show();
Intent startGame = new Intent(getActivity(),Start.class);
Common.categoryId = adapter.getRef(position).getKey();
Common.categoryName = category.getName();
startActivity(startGame);

}
});
}
};
adapter.notifyDataSetChanged();
listCategory.setAdapter(adapter);
}

How to pro-grammatically determine the OS level font name applied in System settings?

I have an requirement to get the font-name currently applied in the system and use same font-name to generate PDF contents. As i searched in official API doc android does not provide any functionality to read the currently applied system font.

I would like to know is there any way to retrieve the name of the currently applied font style ?

Thanks

Help Can i change the latest update that forced accepting permissions on numerous apps?

Can you not just deny that access? Yes, I know it says that the device needs that to function, but I guarantee that it means it needs it for that app to function, so if you don't use Dex I doubt you'll notice. Mind you if you don't use it it also isn't likely to matter what permissions it has (this isn't Facebook or something like that).
So the DEX was possibly a bad example because it's for almost everything. Bixby is the main thing that bothers me. There is no option of denying anymore, the selection stays inactive and it says it needs 'permission' for me to deny the permission?!

Auto download problem

Your current settings show that media will only download when on WiFi, not mobile data. If they are also not downloading on WiFi you might need to reinstall WhatsApp or check your wifi is working correctly or maybe even just a quick restart of your phone will solve the issue.

Finally you may need to check the apps settings within your phones settings page to see if Background Data has been turned off while on mobile data.
Screenshot_20200202-172128_Settings.jpg

Filter

Back
Top Bottom