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
| package com.example.suvajit.servicedemopersistant; | |
| import android.app.Service; | |
| import android.content.Intent; | |
| import android.os.IBinder; | |
| import android.support.annotation.Nullable; | |
| import android.widget.Toast; | |
| public class BackgroundService extends Service { | |
| @Nullable |
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
| package com.example.suvajit.servicedemo; | |
| import android.app.Service; | |
| import android.content.Intent; | |
| import android.os.IBinder; | |
| import android.support.annotation.Nullable; | |
| import android.widget.Toast; | |
| public class BackgroundService extends Service { | |
| @Nullable |
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
| package com.example.suvajit.servicedemo; | |
| import android.app.Service; | |
| import android.content.Intent; | |
| import android.os.IBinder; | |
| import android.support.annotation.Nullable; | |
| import android.widget.Toast; | |
| public class BackgroundService extends Service { | |
| @Nullable |
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 TilingDrawable extends android.support.v7.graphics.drawable.DrawableWrapper { | |
| private boolean callbackEnabled = true; | |
| public TilingDrawable(Drawable drawable) { | |
| super(drawable); | |
| } | |
| @Override | |
| public void draw(Canvas canvas) { |
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 android.content.ContentUris; | |
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.net.Uri; | |
| import android.os.Build; | |
| import android.os.Environment; | |
| import android.provider.DocumentsContract; | |
| import android.provider.MediaStore; | |
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 main() { | |
| var data = {'key': 'value'}; | |
| try { | |
| var value = data['wrongKey']; | |
| print(value); | |
| value = data['key']; | |
| print(value); | |
| print('---------------'); | |
| //This is just to simulate an error |
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 main() { | |
| Foo foo = Foo(); | |
| print(foo.fromA); | |
| print(foo.fromB); | |
| print("====================="); | |
| Foo1 foo1 = Foo1(); | |
| print(foo1.fromC); | |
| print(foo1.fromD); |
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 'dart:typed_data'; | |
| void main() { | |
| const t = 99999999999999999999.0; //A big number | |
| const step = 18871268712.0; //Random number | |
| const max = 999999; | |
| //Initialise time for calculating benchmark. | |
| var initialTime = DateTime.now().millisecondsSinceEpoch; | |
| for (int i = 0; i < max; i++) { |
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 'package:flutter/material.dart'; | |
| const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override |
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
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.letstranzact.app"> | |
| <uses-permission android:name="android.permission.INTERNET" /> | |
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
| <uses-permission android:name="com.google.android.gms.permission.AD_ID" /> | |
| <application | |
| android:name="com.letstranzact.tranzact.MainApplication" | |
| android:icon="@mipmap/ic_launcher" |
OlderNewer