I have this media player project and I have foreground service in it which allows me to control the song through notifications even if I clear the app in the background. Everything is working fine including the controls in the notification. But...the notification just remains forever and cannot be cleared even if I try to clear it until I re-run the app or restart my phone. Please help. Tried things like setAutoCancel(true) and etc
Are you calling
stopForeground()
?
This method takes a Boolean to indicate if you want to remove the notification as well.
Read this article
Related
I'm working on adding universal links to my iOS app and I'm figuring things out but I'm a little lost on what to do when the app is not fully close, just running in the background.
when I debug through the app, it goes to WillContinueUserActivity then it goes to ContinueUserActivity which is fine and expected but I noticed in doing this that the previous screen the user was on is still visible during all of this, is that expected?
I'd prefer to have it seamlessly go to the desired screen and not have some jarring transition.
I think it is expected and by design. You can't make those previous screens invisible programmatically.
Universal links will make the app open the desired page as soon as possible.
I have never deployed an app for texting in a real iOS device, only on an iPhone 7 plus simulator. I've watched some tutorials on how to do it and this is what I have done so far.
I have made an iOS Development Certificate. I made an App id, connected a device and entered the UDID. Then created a new device and at last I have made a Provisioning Profile with the iPhone 7 Device connected. The iOS development certificate connected and the App ID connected. After I did all of that, I continued to watch all the tutorials but there seems to be a change which I can't figure out.
As you can see, in the picture above there is a view detail button which you click then download your Provisioning Profile to your XCode, but for me there is no View Detail button. Instead it looks something like this.
So unfortunately, I don't know what to do from here. I tried going to Xcode > Window > Devices then right clicked on my device then it looks something like this.
So I click Show Provisioning Profiles, press "add" then add my Provisioning Profile. The next thing I did was go back to Xamarian went to info.plist, double clicked it and then entered my Bundle Identifier.
Then right clicked the 2 Calculator file, went down to Options and then set everything up, as you could see in the picture. Then I press run but it doesn't seem to work
This error message comes up:
I am pretty sure I have done everything right, but there seems to still be an error. The only possible bit I think may have gone wrong is when there wasn't the "view detail" button, so I did it a another way. Maybe the problem is I downloaded the Provisioning Profile on the iOS Device, but not in the Xcode mac or something?
I don't have a clue what I did wrong and have tried everything about 5 times but it still didn't work. It will be great if someone could help.
These are all the Certificate and stuff I did in the App development section.
Not enough reputation to comment, so I am going to take a shot in the dark here. My question to you is, did you download the certificate to your MacBook before or after you added your mobile device to it? Your Mac has to know of which devices you have allowed to develop on, so you need to make sure your .mobileprovision on your Mac has that UDID in it.
You can check if your .mobileprovision is added by looking in "~/Library/MobileDevice/Provisioning Profiles" and sorting by "Date Modified" to see if you have a fresh one updating after you downloaded it from developer.apple.com. Xcode will assign a GUID to the name so the provisioning profile will not have the name displaying on the website.
Also, the error possibly looks certificate related. Is the certificate valid and trusted in your keychain? I noticed no mention of adding the certificate to the "Keychain Access" application.
Obviously, after the crash Developer tools at port 9222 is of no use, because "Remote debugging has been terminated with reason: websocket_closed". How can I retrieve, for example, recorded timeline; or get call stack; or find anything about the reason the Chromecast decided to reboot itself? What are the best (or, for that matter, any) approach to debug Chromecast crashes?
We need to look at your log file to see what is causing the crash. It is relatively easy to do that but we need some help from your side.
First, open the Chromecast setup app on, say, your Android device and go to the settings for your device. You should see a check box that states something like: "Send Chromecast usage data and crash reports to Google". If it is not checked, make sure you check it and then wait 15 minutes or so and reboot your chromecast.
Try to recreate issue and as soon as it crashes and reboots itself, open the setup app again and select "Submit feedback report" from the overflow menu. You will see a new window on your phone and make sure you enter the following text in the text box there "crash-vmt". We will be using this text to search among the reports that we receive to identify your log.
After doing that, please let us know (add a comment here) so we can grab the log for further investigation.
I've been trying to create a proper Restart feature within my app, which doesn't work (Orientation is meshing up badly) so since this is a prototype I figure it will be easier if I just crash my app and the user taps again the icon.
Is there a way I could kill my application from code within 1-2 sec.?
Thank you!
You mean you want to quit your app when user taps on home button instead of going the app into background? If yes you can quit the app when user presses home button by adding a key into your info.plist file application does not run in background and set it's value to true. Here is the original key name UIKeySuspendOnExit I don't remember excatly but it should be like this. Find on google you will get easily.
I've managed to get the application I'm writing to present a UILocalNotification when it is in the background. Though when the application resumes, the user interface becomes inactive.
Is anyone aware of how to get the application responding again having resumed from the background state?
Thanks,
Matt.
I had this problem and found that the answer is to not set up your notifications while in debug. Instead make sure your app has quit fully, launch it from the homescreen and then set the notifications.