This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void)fetchedData:(NSData *)responseData { | |
| NSError* error; | |
| //Build a JSON object from the response Data | |
| NSArray* json = [NSJSONSerialization | |
| JSONObjectWithData:responseData //1 | |
| options:kNilOptions | |
| error:&error]; | |
| //Go through each POI in the JSON data and pull out the important fields |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface Constants : NSObject | |
| #define kBgQueue dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) | |
| extern NSString *kGetPOIUrl; | |
| extern NSString *kGetSASUrl; | |
| extern NSString *kAddPOIUrl; | |
| extern NSString *kContainerName; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (IBAction)tapPostPOI:(id)sender { | |
| UIImage *image = imageView.image; | |
| NSData *data = UIImagePNGRepresentation(image); | |
| //Just pass the call over to our generic serviceCaller | |
| [serviceCaller postToUrl:sasURL | |
| withBody:data andPostType:@"PUT" andContentType:@"image/jpeg" withCallback:^(NSString *response) { | |
| //This is the callback code that the ServiceCaller will call upon success | |
| labelSasUrl.text = response; | |
| if ([response isEqualToString:@""]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Constants { | |
| public static final String kFindPOIUrl = "http://yoursubdomain.azurewebsites.net/api/Location/FindPointsOfInterestWithinRadius"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:id="@+id/scrollview" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" > | |
| <LinearLayout | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:orientation="vertical" > | |
| <TextView | |
| android:id="@+id/lblAddPoiHeader" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private class GetSASTask extends AsyncTask<String, Void, String> { | |
| @Override | |
| protected String doInBackground(String... params) { | |
| getSas(); | |
| return _blobImagePostString; | |
| } | |
| /*** | |
| * Handles results of getting SAS. | |
| * This happens on the UI Thread | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @class TodoDetailsViewController; | |
| @protocol TodoDetailsViewControllerDelegate <NSObject> | |
| - (void)todoDetailsViewController:(TodoDetailsViewController *)controller didFinishWithTodo:(NSString *)todoId andTodoText:(NSString *)todoText; | |
| @end | |
| @interface TodoDetailsViewController : UIViewController<NSURLConnectionDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate> { | |
| @private | |
| NSNumber* todoId; | |
| NSMutableData* receivedData; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private Button mBtnSaveTodo; | |
| private Button mBtnPickImage; | |
| private Button mBtnMarkTodoComplete; | |
| private TextView mLblTodoText; | |
| private EditText mTxtTodoText; | |
| private boolean mIsAddingNewTodo; | |
| private String mTodoText; | |
| private int mTodoId; | |
| private ImageView mImageView; | |
| private Uri mImageUrl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <UIKit/UIKit.h> | |
| @interface SecondViewController : UIViewController | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER TABLE fakeblog.entries | |
| ADD PRIMARY KEY (id); | |
| ALTER TABLE fakeblog.Users | |
| ADD PRIMARY KEY (id); |