When a user flips their keyboard out or switches between portrait and landscape, the activity seemingly restarts. This is fine except I have my activity play music. When this occurs, there are then TWO music files playing, and pressing back only stops ONE of them! I've disabled switching between portrait and landscape for the activity, but sliding the keyboard out still causes the issue!
Android: Activity restarts on switch to landscape/keyboard flips out
725 Views Asked by Joshua Coffey At
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in KEYBOARD
- Layout not shifting up when keyboard is open
- Unity3d - Input.GetKey returns true more than once
- Android: how to prevent jumping/flashing of views when trying to replace keyboard with a view
- Objective c keyboard opens unwillingly
- How to add scrollview to keyboardView in android
- C# - SendInput() - Hold Key Down?
- How to change keyboard language programmatically in windows 8
- Dismiss the Keyboard in Swift via hitTest
- How to convert VK scan codes to appropriate character for language selected
- How to get keystrokes with java outside of frames
- del key on a PC keyboard with MAC mini
- How to find which key is pressed, not which character it will be?
- Android soft keyboard in Chinese languages
- Is this Possible to add Keyboard Predictive option in UISearchBar keyboard
- Xcode Changing Keyboard
Related Questions in ANDROID-ACTIVITY
- Android - No view found for fragment
- Does a recreated activity remember the original intent started it?
- I want to Show Simple Toast Message When User Click On Media Controller button Pause/Start/Stop in video View Using Media Controller
- Why does this run out of memory? Shouldn't the Activities be released?
- How to check in an (Android) async task if the activity it was called from was finished?
- Android Resources Not Found Exception
- How to handle multiple activity task in android when press home?
- Google Play services LocationSettingsAPI - LocationSettingsRequest Dialog not Showing
- How to land or navigate to previous activity if click on back button
- How to scale the imageview and view with matrix using seekBar?
- how to get the URL from mainActivity to the second activity using intents?
- Coordinator Layout with Toolbar in Fragments or Activity
- NullPointerException error in Android: Unable to instantiate
- ListView OnItemClickListener with a new Activity
- How can i send main activity to inner class inside of Fragment java class?
Related Questions in LANDSCAPE
- How to change output picture orientation in custom camera app? [Android]
- how to set a viewController only landscape in iOS8.0
- auto layout issue in landscape view custom keyboard
- Android force ActionBar inside of Toolbar on Landscape
- Eclipse Layout: How to support multiple screen sizes in landscape mode?
- Cordova splash screen plugin iPad landscape mode issue
- Where to put header.tex to change page to Landscape Rmarkdown
- UE4: How to get an actor or surface to change it's material when clicked?
- how can I disable landscape mode javafx?
- landscape j2me game with WTK emulator
- Android: How to layout buttons along right/left edge of screen, when in landscape mode
- Getting images upside down when taken in landscape mode (Android)
- How do I use TouchID in landscape mode?
- Force landscape mode in one ViewController using Swift
- Different screen orientation for iPhone and iPad
Related Questions in PORTRAIT
- Android: How to layout buttons along right/left edge of screen, when in landscape mode
- Different screen orientation for iPhone and iPad
- Right @2x for retina 4 hd
- How to set AViewController (subclass of TabBar and Nav Controller) to portrait only
- Android - Fragments or custom views? Which should I be using?
- Delphi XE5 iPad, application starts in portrait view
- Cocos2dx v.3.0 Portrait Mode
- Android: Activity restarts on switch to landscape/keyboard flips out
- screen orientation
- Forcing Portrait mode OOM bitmap resize
- Android Gingerbread 2.3 Orientation Lock
- Force "portrait" orientation mode
- UIView position jumps a few pixels upwards while launching application in portraing mode
- Lock Android phone application to Portrait mode
- How to open new view when device is rotated to landscape orientation?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
FIrstly, check out the android:configurationChanged attribute. Secondly, the music playing is usually done by the service or the AsyncTask in simple cases. Try this two approaches.