I am using heremapslite api for android , recently upgraded into 4.4 , where this Runtime exception started coming up
java.lang.RuntimeException: Only one MapViewLite instance can be created at a time
The real issue is that , when ever i have to start another activity than maps activity, the instance does not gets destroyed (i don't want to finish the activity intentionally as users might want to return) and when the same activity is started again (say for another project or with another configuration) this exception occurs (which wasn't there in the previous version) .been through release notes , find nothing about it, so is there any option to find the existence of an instance of mapviewlite and to destroy it? or is there any other option to remedy it.
PS: I am unable to catch some of the exceptions related , especially with onPause() and onResume() methods.
You can call
mapViewLite.onDestroy();
. Once called, you should be able to create a newMapViewLite
instance.