That didn't work... maybe this?
This commit is contained in:
		@@ -190,15 +190,19 @@ class GoodSoftware (private val activity: Context) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    private fun takePicture(){
 | 
					    private fun takePicture(){
 | 
				
			||||||
        val activity = activity.getActivity()
 | 
					        val activity = activity.getActivity()
 | 
				
			||||||
        activity?.let { act ->
 | 
					        try {
 | 
				
			||||||
            if (act is LifecycleOwner) {
 | 
					            activity?.let { act ->
 | 
				
			||||||
                act.lifecycleScope.launch {
 | 
					                if (act is LifecycleOwner) {
 | 
				
			||||||
                    takeBeautifulPicture(act, act)
 | 
					                    act.lifecycleScope.launch {
 | 
				
			||||||
 | 
					                        takeBeautifulPicture(act, act)
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    // Handle the case where the activity is not a LifecycleOwner
 | 
				
			||||||
 | 
					                    Log.e("Error", "Activity is not a LifecycleOwner")
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
                // Handle the case where the activity is not a LifecycleOwner
 | 
					 | 
				
			||||||
                Log.e("Error", "Activity is not a LifecycleOwner")
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					        }catch (e: Exception) {
 | 
				
			||||||
 | 
					            e.printStackTrace()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user