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
using System; | |
using System.Timers; | |
using Android.App; | |
using Android.Content; | |
using Android.OS; | |
namespace SampleBackgroundServices.Droid | |
{ | |
public class TimeTrackingService : Service | |
{ |
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
[assembly: Xamarin.Forms.Dependency(typeof(NAMESPACE.Droid.InAppReviewService))] | |
namespace NAMESPACE.Droid | |
{ | |
public class InAppReviewService : IInAppReview | |
{ | |
public void LaunchReview() | |
{ | |
#if DEBUG | |
// FakeReviewManager does not interact with the Play Store, so no UI is shown | |
// and no review is performed. Useful for unit tests. |
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
/* Steps: | |
1. Change the targetframework of your android project to Android 10 or above | |
2. Then add this file to your project either in one file or separate files. | |
3. Change the namespace from App.Droid to your Android project's namespace. | |
4. Then in all activities that inherit MvxAppCompatActivity or MvxActivity, add this override and build: | |
protected override void AttachBaseContext(Context @base) | |
{ | |
base.AttachBaseContext(MvxContextWrapper2.Wrap(@base, this)); | |
} | |
*/ |
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
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" x:Class="XamarinGoogleSheetsDB.MainPage" | |
BackgroundColor="LightGray"> | |
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" Padding="40" WidthRequest="400"> | |
<Label Text="FEEDBACK" FontAttributes="Bold" FontSize="Title"/> | |
<Entry x:Name="NameEntry" Placeholder="Name" ReturnType="Next" /> | |
<Entry x:Name="EmailEntry" Placeholder="Email" ReturnType="Next" Keyboard="Email" /> |
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
function doPost(request){ | |
// Open Google Sheet using ID | |
var sheet = SpreadsheetApp.openById("{SheetID}"); | |
var result = {"Status": "SUCCESS", "Message": "Thank you for your feedback"}; | |
try{ | |
// Convert post data content to a JS object | |
var resultObject = JSON.parse(request.postData.contents) | |
// Append data on Google Sheet | |
var rowData = sheet.appendRow([resultObject.Name, resultObject.Email, resultObject.Phone, resultObject.Feedback]); | |
}catch(exc){ |
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
using System; | |
using System.Net.Http; | |
using Newtonsoft.Json; | |
namespace GetRestAPIJSON | |
{ | |
class MainClass | |
{ | |
public static void Main(string[] args) | |
{ |
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
[ | |
{ | |
"name": "Saamer Mansoor", | |
"phone": "2146839508", | |
}, | |
{ | |
"name": "Kamran Shora", | |
"phone": "+1-416-543-9954", | |
} | |
] |
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
name: CI on Push and Pull Request | |
on: [push, pull_request] | |
jobs: | |
Practice: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Run a one-line script |
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
// CheatSheet | |
// FUNCTIONS | |
func Main(){ | |
Hello() | |
} | |
func Hello(){ | |
print("WHAT") | |
} | |
Main() |