Questions tagged [recreate]

recreate() is an Android SDK API method available from API lvl 11 (Android 3.0) that causes the calling Activity to be destroyed and recreated.

Official method documentation:

Cause this Activity to be recreated with a new instance. This results in essentially the same flow as when the Activity is created due to a configuration change -- the current instance will go through its lifecycle to onDestroy() and a new instance then created after it.

For more information about Android Activity lifecycle see http://developer.android.com/reference/android/app/Activity.html

122 questions
0
votes
2 answers

Android Lollipop - prevent task manager from ending my app

My goal is to make my app unkillable. Application has admin permissions granted. I have one activity and one service. Applionation cannot be uninstalled while Admin permission is active (thats good). Service is auto re-creating. That's also…
Lau
  • 1,804
  • 1
  • 23
  • 49
0
votes
1 answer

How to recreate a activity with last used fragment

I have a fragment say FRAG A in my activity, now i have added one more fragment on top of it say FRAG B. Now i want to recreate the activity with FRAG A and FRAG B. But the fragments should go through the config changes means it should reload or…
andinrajesh
  • 575
  • 2
  • 9
  • 24
0
votes
1 answer

Trying to recreate function atoi

I've problem in recoding function atoi. Here is the code (just function body): int atoi2(const char *s) { int i, sum = 0; for (i = 0; isdigit('*s') == 1; s++) { sum = (sum * 10) + *s; i++; } return sum; } Whenever i…
0
votes
1 answer

android calling recreate in onDestroy()

Can I call recreate() in onDestroy() method of MainActivity? The idea is to restart the activity whenever OS stops it. Is it possible and are there any disadvantages of doing this. Basically, I have a blank activity that starts many services, but…
And_Dev
  • 113
  • 2
  • 12
0
votes
1 answer

I have assets folder but not settings folder. Can I recreate unity3D project?

so as the title says, I'm trying to recreate a unity3D project and the only thing I have is the Assets folder with the assets and their meta files. Is there any way to do this?
0
votes
0 answers

Android App Crashing When Activity Recreates

In my application , there is an activity in which data is saved in java databean. Data is being saved depending on user selection. Now I pause and then stop my application by minimizing it. Now in background I open 18-20 applications . In the…
0
votes
2 answers

Activity recreate itself when press back button

I have 2 activities. ActivityA : i use ImagePickerActivity from poly-picker library to select multi files and send paths to ActivityB ActivityB : each file, i create one view and add to relative layout programmatically. But my problem is when i…
phamxuanlu
  • 303
  • 1
  • 5
  • 12
0
votes
1 answer

Docker recreates directories on host after reboot

I created some containers on my system (ubuntu 14.04) using docker-compose which mounted directories from the host into the containers. Now, every time I reboot the host, these directories are recreated, even though the containers do not longer…
Martin
  • 2,754
  • 1
  • 15
  • 35
0
votes
1 answer

Restoring instance variables in Android upon activity recreation

I have an Android project for which I am creating a custom tab view. I have structured the main Activity (FragmentActivity) in such a way that it has a tab bar at the bottom of the screen with a FrameLayout above it. Each option on the tab creates a…
Rishabh Poddar
  • 919
  • 3
  • 9
  • 17
0
votes
2 answers

Trying to reload an Android activity from itself not working

My problem is: I can't figure out a way to restart my activity from itself. For example in a game, if you die, there's a menu with an option to retry, which restart the stage instantly. That's exactly the case. As i have read from a lot of others…
Gerardpp
  • 45
  • 2
  • 4
0
votes
2 answers

How to write a Rake task that imports data and handles deletions?

I want to do the same thing as explained in this question How to write Rake task to import data to Rails app?. However, i am not satisfied with the accepted answer because it does not consider deleted items in the source. What is the simplest, most…
tantalum
  • 5
  • 3
0
votes
1 answer

Share dialog recreates on orientation change in Android

I'm starting share dialog on item click this way: Intent share = new…
Max Makeichik
  • 227
  • 4
  • 18
0
votes
0 answers

On ajax call recreate jsTree checkbox's

Hi I want to recreate jsTree with ajax call when radioButton "rdbFactTables" is clicked. I am using jQuery and jsTree scripts. I get right output in cosole when i print "data" parameter, but from some reason tree won't recreate itself. Here are…
xyman
  • 399
  • 3
  • 10
0
votes
0 answers

push notification - recreate pem from existing

starting from the steps reported in this post: Generate .pem file Used to setup Apple PUSH Notification is it possible to recreate the apsn-server.pem for production server starting from the point 7?
tylyo
  • 572
  • 5
  • 16
0
votes
1 answer

Sliding menu onListItemClick go to the previous fragments without recreating new one

I am currently using android sliding menu library from https://github.com/jfeinstein10/SlidingMenu. It's great but I have no idea how to toggle without recreating a new fragment. I have two fragments called A, B. A menu list : Item A, Item B. I…
Shumin
  • 991
  • 2
  • 13
  • 22
1 2 3
8 9