Now that the app is almost ready to publish I need to sit down with DCP and McVey to discuss how they will be able to download the project files. I am using Xcode on my Mac and they would need Xcode as well to open the project and the project files. The free developer account only allows for the app to be installed for 7 days on a device without redownloading it on to the device. For new features I added a userlocation pin and the ability to select songs for pins that you want to add. I only have the royalty free songs due to copyright reasons so those are the songs you are seeing below. I also added the circles button at the bottom of the screen.
0 Comments
GOOD NEWS. I was able to figure out the region monitoring issue. BAD NEWS. The region sizes just need to be bigger. The overall region monitoring is only as accurate as the cell towers in the area allow. I was able to get access to the accelerometer details which printed the accuracy of my location. I also was able to add the blue cone to tell which direction the user is looking using the accelerometer. This will hopefully help me with my harmonization. I ended up making the region sizes bigger so the outer circle is now 200m, middle is 145m, and the inner is 85m. The regions all work as expected now and they all fire as they should. I get the correct notifications and the volume does get louder as I get closer. I decided to have a standard set of pins hosted on the server that everyone will get when they initially open the app. If pins are added to that server I need to test that it also pulls those pins as well. There are a local set of pins that are on each device so when you add a pin it will show on the map for you. I need to do a verification on the new pins added to local files but I am not quite sure how to do that when each coordinate has a format of 0.00000 and a new pin could be added 0.00001 away and it technically would count as a new pin just right on top of the old one. I also do not have any functionality for choosing a song for individual pins. I am still just streaming the songs from the server and I will do further testing tomorrow. I also spent some time on the UI so I hope it looks better!
I mainly did testing all week and we had the project walkthroughs. The walkthrough was helpful and after sitting down with DCP and Dr. McVey I have some good ideas for how to handle the intersection of regions. I also decided to store the pins locally on the device. I am thinking about doing the same for songs but time will tell. THE MAIN PROBLEM is that I have extremely inconsistent results with the region monitoring. I have it set up so it monitors the 6 nearest regions to the user. Each of those 6 regions has 2 inner regions that are also being monitored. They initially were the outer: 85m, the inner: 50m, the innermost: 25m but the regions themselves were not not being triggered. I got very inconsistent results as some regions would fire and others wouldn't. The next thing I noticed is that maybe 2% of the time the inner 2 circles would fire. I think because of how small the distance is between regions it wasn't recognizing them. I am currently resizing the regions for testing and ruling out the accuracy of the GPS if that is really what this is. The user location seems to be spot on at all times but the regions firing when the user enters them seem to be the problem. I upped the region sizes to 200m, 100, and 65 for testing the next day and a half or so. More to come on this.
A lot has happened since I was last able to update this. I have implemented a very robust menu screen that needs a lot of work, I have added a second screen which will eventually allow the user to add pins, I have attempted to get the volume working depending on how close a user is to the pin, and I have created a separate map type view. Below are the screenshots for these. The key areas I need to focus on for crunch time are: getting the harmonizing part to work (have not started this), fully testing the volume feature, making the menu look a lot nicer, and the lowest priority is allowing users to add pins. That final feature requires the users to write to the HTTP server and I am not familiar with how to tackle that yet so it is on the back burner. The circles on the map eventually will go away so you can see better. I also would like to figure out how to get it to proportion itself to different screen sizes which I have not tested due to only having my phone. I used the simulator and it does not resize correctly but on a real device I need to test.
For DCP and McVey: The free dev account with IOS only allows the app to last on a device for 7 day before it has to be reinstalled. I am not sure if this is a concern because you will have complete access to the project files. Just thought I should note it. I have been testing the reliability of the app without the modular array and all of the regions are currently being recognized. Over spring break I hope to put in some serious time to hopefully get this app close to complete from a requirements standpoint. I hope to add some useful UI to make the app look smoother and easier to use. Not much on the update log from the passed week. Hopefully it warms up so I can walk around to test without my hand freezing off.
I have come to some conclusions last week and have been mainly researching the ways to implement them. To make this app more modular I am going to have to track significant location changes in order to make sure that I can always store the points that are added to the file. This means that I have to track when the user moves and then update the monitored locations to be the closest 10 points. I also am going to move away from the didEnter() and didExit() functions because they do not seem to give results as fast as I would like. I am going to keep them and commit and push the changes and then start testing didDetermineState() as it is a lower level API and might be a bit quicker. It sometimes takes two minutes to register that I am inside the current region so I think this will solve this problem. Implementation commences tomorrow.
Working with Dr. McVey we worked through the callback and were able to create an array. This however we still could not get passed back to the main thread so I punted as we all do sometimes and just wrote the string from the URL to a file. Then on the main thread I had to ensure that the completion handler finished so I could read that file in. I then was able to access all of the information from that URL that was written to the file. Now is decision time. I have some options on how I want to handle adjusting the current volume. Many people during the whiteboard session mentioned using concentric circles and just monitor them individually so then it would just adjust the volume when entering the inner circle. This would work but with the Apple API call I am only allowed to monitor 20 regions. Doing some quick math if I only wanted one volume adjustment I would only be able to monitor 10 circles with one inner circle volume adjustment. This is not the worst thing because of the accuracy of the location that I am getting back at best to be within 25 meters so if I monitor for regions over 50m this would work. Otherwise I have to implement a solution where I update an array of the closest 10 points with the concentric circles if the user travels a significant distance from their last point. This is the better solution but I am not sure the time that this might. I also am able to do a distance from the users location but that would only be useful if I could pass all of the coordinates to the didupdateLocation() function which I have not been able to modify as it is one that CoreLocation comes with. More research on this to come.
This week was not very productive after the breakthrough was made. Lots of school work outside of this class and potential job opportunities things came first so this was put on a bit of a hold. I am confident next week will be better. The nice thing is if I can figure out this callback the foreseeable future looks very good. I can set up the concentric circles using a distancefrom inside of the CLLocation library. The music playing and the volume was also tested at the beginning when all of the files were local so those both should work once I have access to this array. The region monitoring is the only thing that may be difficult to work with when in between two regions. This is all I have for an update as of now but hopefully we can make better progress in the upcoming week. Overall the project is not at risk and is on track still!
Finally I am able to get a circle to mark the region and on top of that my monitoring of the region is working correctly!!!!!!!! I was using the wrong function calls which was the key to getting both of these to work. I also had to add an overlay extension to get the circle to appear but they are both working. With region monitoring working correctly I can now play a song when entering that region. The exit also works and shows on the screen but it is a little more delayed. It took up to 2 minutes to display after exiting the region so I am not sure if this was because of signal or because that is truly how long the call took. I will dig more into this later but am happy that these work. Next steps are to get this callback working to set up the pins and to figure out if I can play .wav files from the server or if I need to pull them onto the device and store them on the app itself.
I am able to load in the coordinates from the server and I think I have the completion handler set up correctly. I just need to figure out how to use the completion handler to get the data out of the URL call. I also have a region set up but the didenter and directing functions I have are not currently monitoring for when I am moving. I attempted to add a circle to the region radius so I could see exactly when I was entering and exiting but I did not have a chance to finish that yet. Hoping to make more progress this week on all of these and have them all working by the end of next week.
|