profile
viewpoint
Scott Alexander-Bown scottyab scottyab Bristol, UK https://www.scottyab.com Android Developer (remote), author, speaker, father and scruffy looking nerf herder. Love coffee, Belgian beer and running. Founder @swmobilegroup

neild001/SeekArc 851

Circular SeekBar view for Android

scottyab/AESCrypt-Android 623

Simple API to perform AES encryption on Android. This is the Android counterpart to the AESCrypt library Ruby and Obj-C (with the same weak security defaults :( ) created by Gurpartap Singh. https://github.com/Gurpartap/aescrypt

scottyab/androidkeystore 52

This started out as the sample project from Android sdk modified folder structure to for eclipse.

scottyab/android-device-stats 8

Device Stats is a designs for people developing Android apps to quickly and easier see the exact specs of a device. Ideal for test devices where you aren't 100% sure on the resource qualifiers.

helpscout/beacon-devtools 5

🖲 Beacon: DevTools

scottyab/android-environment-configuration-sample 5

Sample app used in blog post to illustrate a way of externallising config strings and adding DexGuard protection

scottyab/Android-Security-Reference 4

A W.I.P Android Security Ref

scottyab/AboutLibraries 2

AboutLibraries is a library to offer some information of libraries.

scottyab/AppIntro 2

Make a cool intro for your Android app.

scottyab/android-api-SecureKeys 1

Store sensible data in a simple and secure way

PR closed scottyab/secure-preferences

V1.0 revamp

Big changes!

  • Abstracting the pref key obfuscation and pref value encryption
  • externalised key gen to allow developers using this library to handle permissions when getting the device ID/Serial.
  • Cleaned up the constructor now and added SecurePreferenceCreator to assist new users
  • updated Sample app
  • provided decrypting onPreferenceChangeListener support
  • migration of keys supported.

TODO:

  • update changes and readme.md

**Looking for comments and feedback before merging to master. **

+2391 -1641

0 comment

59 changed files

scottyab

pr closed time in 5 days

issue closedscottyab/secure-preferences

How to use sharedPreference in flutter to stay user loggedin in flutter using a setBool and GetBool

I am practicing a email authentication in flutter and almost everything is over. Now, i want to use sharedPreference to stay the user logged in. I have tried something, but i don't get result. I am using a bool type to get whether user loggedIn or not. But i am very new to this, can you help me in this? and is there anything i am missing out?

This is the sharedPreference static Class i am using

class sharedPreference {
  static String sharedPreferenceUserLoggedInKey = 'userLoggedIn';
  static String sharedPreferenceUserSignedUpKey = 'userSignedUp';

  //saving data to sharedPreference
  static Future<bool> saveUserLoggedInSharedPreference(
      bool isUserLoggedIn) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    return await prefs.setBool(sharedPreferenceUserLoggedInKey, isUserLoggedIn);
  }

  static Future<bool> saveUserSignedUpSharedPreference(
      bool isUserSignUp) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    return await prefs.setBool(sharedPreferenceUserSignedUpKey, isUserSignUp);
  }

  //getting data to sharedPreference
  static Future<bool> getUserLoggedInSharedPreference() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    return await prefs.getBool(sharedPreferenceUserLoggedInKey);
  }

  static Future<bool> getUserSignedUpSharedPreference() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    return await prefs.getBool(sharedPreferenceUserSignedUpKey);
  }

}

This is the signIn button triggering the setBool: SignInButton:

FlatButton(
onPressed: ()
{
HelperFunction.saveUserLoggedInSharedPreference(true);
        Navigator.pushReplacement(
          context,
          MaterialPageRoute(
            builder: (context) => DashBoard(email: email),
          ),
})

The main function

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light
      .copyWith(systemNavigationBarColor: Colors.black));

  runApp(
    DevicePreview(
      enabled: kReleaseMode,
      builder: (context) => FlashChat(),
    ),
  );
}

class FlashChat extends StatefulWidget {
  @override
  _FlashChatState createState() => _FlashChatState();
}

class _FlashChatState extends State<FlashChat> {
  bool isUserLoggedIn;
  bool isUserSignedUp;

  void getLoggedInStatus() async {
    await HelperFunction.getUserLoggedInSharedPreference().then((value) {
      isUserLoggedIn = value;
    });
  }

  void getSignedUpStatus() async {
    await HelperFunction.getUserSignedUpSharedPreference().then((value) {
      isUserSignedUp = value;
    });
  }

  @override
  void initState() {
    getLoggedInStatus();
    getSignedUpStatus();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
          initialRoute: isUserLoggedIn == true
              ? DashBoard.id: WelcomeScreen.id,
          routes: {
            WelcomeScreen.id: (context) => WelcomeScreen(),
            LoginScreen.id: (context) => LoginScreen(),
            RegistrationScreen.id: (context) => RegistrationScreen(),
            DashBoard.id: (context) => DashBoard(),
          },
          debugShowCheckedModeBanner: false,
        );
      });
    });

closed time in 5 days

berneberne

issue commentscottyab/secure-preferences

How to use sharedPreference in flutter to stay user loggedin in flutter using a setBool and GetBool

Agreed. I would not use this library it's not maintained as Google's EncryptedSharedPreferences from androidx.security should be preferred.

berneberne

comment created time in 5 days

issue commentscottyab/rootbeer

Is selinux flag giving a false positive?

Hey @grubeli sorry it feels that way. Merged your PR thanks for the contribution.

test-pad

comment created time in 12 days

push eventscottyab/rootbeer

grubeli

commit sha 091a157959a2de58abc4b51b99fb9189ecd284e2

Fix selinux FP (#184)

view details

push time in 12 days

PR merged scottyab/rootbeer

Fix selinux FP

https://github.com/scottyab/rootbeer/issues/183

+1 -1

0 comment

1 changed file

grubeli

pr closed time in 12 days

PR opened scottyab/MaterialSpinner

Crash in onRestoreInstanceState when adapter set but empty

Fix IndexOutOfBoundsException when rotating the screen and adapter is empty

+1 -1

0 comment

1 changed file

pr created time in a month

create barnchhelpscout/MaterialSpinner

branch : hs-1.3.1-jitpack

created branch time in a month

push eventscottyab/MaterialSpinner

Scott Alexander-Bown

commit sha 719755ef3d3500a580324564939cbd20374c946a

Fix IndexOutOfBoundsException when rotating the screen and adapter is empty

view details

Scott Alexander-Bown

commit sha 3407e79f8c3026c97a247849729bf4027454160f

Merge branch 'fix-on-rotation-crash' into hs-1.3.1-jitpack * fix-on-rotation-crash: Fix IndexOutOfBoundsException when rotating the screen and adapter is empty

view details

push time in a month

create barnchscottyab/MaterialSpinner

branch : hs-1.3.1-jitpack

created branch time in a month

create barnchscottyab/MaterialSpinner

branch : fix-on-rotation-crash

created branch time in a month

issue commenthelpscout/beacon-android-sdk-sample

Feedback survery never dissapear

Hi @krobert I've attempted to recreate using the "Chat Test" Beacon on your account but we are still unable to reproduce this issue 🤔 . I cannot see a way forward unless it's device/region related or the way the SDK is being used? Could you fork the simple kotlin project add your code and demonstrate via video that the issue is reproducible?

Also side note I'm not clear why you're BeaconConfigOverrides(chatEnabled = true, messagingEnabled = true ... when all your Beacon's have all the settings enabled.

krobert

comment created time in 2 months

create barnchhelpscout/beacon-android-sdk-sample

branch : main

created branch time in 2 months

delete branch helpscout/beacon-android-sdk-sample

delete branch : master

delete time in 2 months

issue commenthelpscout/beacon-android-sdk-sample

Feedback survery never dissapear

That is strange behaviour. I don't have a clear picture of all the code you are using apart from the snippets here. It would ideal if you could fork this repo and copy & paste your beacon calling/config code into the Simple Koltin sample and share it will us, either privately via github or via help@helpscout.com

Something that looks unusual in your gif apart from the weird blinking, I don't understand why you're loading an article from the Customer support menu? it might be a business requirement? typically this type of menu would open the Beacon landing page.

❓ Are you calling BeaconActivity.openInSecureMode(this, helpScoutSignature) Then immediately BeaconActivity.open(activity, BeaconScreens.ARTICLE_SCREEN, arrayListOf(articleId)) ?? if so this could be an issue as the SDK was not designed this way. As mentioned in the previous message it would help if you could give us more context on what you are trying to achieve.

I'm really keen to help but without the Beacon Id or a clear reproducible demo it's difficult to know how to assist further.

🗒️ Good spot on the version 3.1.0 but it's a red herring 🎣 and the code is the same as 3.0.2, it's just we have automatically incremented the version on our local develop branch.

krobert

comment created time in 2 months

issue commenthelpscout/beacon-android-sdk-sample

Feedback survery never dissapear

The main screen is not loaded properly behind the article.

Sorry if this isn't clear but this is the expected behaviour. We designed open direct to article to load an article but not the full Beacon. So I would expect the Beacon landing page not the be opened in the background. It would help if you let us know what you're trying to achieve/desired behavour as potentially there's another way of achieving this. I.e Custom suggestions

I'm still unable to recreate the issue you are seeing. See the gif below which uses our internal Beacon sample where I can specific the articleId that's passed to BeaconActivity.open(activity, BeaconScreens.ARTICLE_SCREEN, arrayListOf(articleId)).

Screen Recording 2021-09-14 at 01 33 02 pm

I cannot assist further until you let us know the details requested in the previous message (Beacon Id and company) thanks

krobert

comment created time in 2 months

issue commenthelpscout/beacon-android-sdk-sample

Feedback survery never dissapear

The id, email etc is still in progress, trying to find the right person to get permission for sending it

@krobert I totally understand you want to seek permission before sharing user details but can you share the Beacon Id and which company you work for with Help@helpscout.com so we can attempt to recreate this issue. As you can see below here's my attempt with 3.0.2 one of our test Beacons showing what we expect for each of the rating types.

positive negative
Screen Recording 2021-09-14 at 11 21 09 am Screen Recording 2021-09-14 at 11 26 59 am

Looking at your supplied code the chatEnabled = true, messagingEnabled = true, in the BeaconConfigOverrides could be a potential issue? (although I cannot tell for sure until I can check your Beacon config once you supply the BeaconId.) I must apologise as the feature overrides aren't well named (i.e messagingEnabled, chatEnabled and docsEnabled). It's not possible to enable a feature that isn't enabled in your Beacon's config, these were added as a way to override and disable features. I.e disabling chat for non paid users. We tried to highlight this in the developer docs here but as mentioned the naming could be improved.

but i needed androidX, koin and multiple upgrades So i upgraded to 3.0.2 if i can suggest, please start removing these blocking third party libraries.

I'd like to fully understand the issues you are facing here with the SDK's dependencies. Please could you send us feedback to help@helpscout.com feel free to be technical/detailed as it'll be fellow Android developers reading.

krobert

comment created time in 2 months

issue commenthelpscout/beacon-android-sdk-sample

Feedback survery never dissapear

thanks for checking that @krobert. As @jotaemepereira mentions if you can let us know the BeaconId email and signature of a testing user we can attempt to recreate the error you are seeing.

Additionally please could you provide the following details which are missing from this issue (they are noted in the GitHub issue template)

  • Android OS version:
  • Device make/model:
  • Impacted user count:

Thanks!

krobert

comment created time in 2 months

issue commentcoil-kt/coil

Crash

I also ran into this java.lang.NoSuchFieldError: coil.decode.DecodeUtils issue. It was because we were forcing and older incompatible version of Okio 1.17.2. We mistakenly thought we needed to as part of ensuring okHttp was 3.14.9 (needed for Retrofit). Changing okio version to 2.10.0 fixed the issue.

XtreeIvI

comment created time in 2 months

issue commenthelpscout/beacon-android-sdk-sample

Feedback survery never dissapear

Hey @krobert I had a couple of additional things to double check with you.

  1. Are these the steps to reproduce that you are following?

Steps to reproduce:

  • User opens article they have not previously rated. (if they had previously rated the Rating bar would be hidden)
  • Rating bar is shown at the bottom of the article
  • User taps either :) or :(
  • The rating animation is shown (the emoji nods or shakes depending)

Expected

  • Article is still shown but the rating bar is hidden

Actual

  • Article is still shown but the rating bar is hidden
  1. When rating an article (tapping :) or :( ) the Beacon SDK will send an HTTP PUT request to the Beacon API {beaconId}/docs/articles/{articleId}/feedback/{deviceId} If the PUT fails the rating bar would continue to be shown. I see you have withLogsEnabled(true) Are you seeing any HTTP errors in the logs when the user is tapping the Article feedback?
krobert

comment created time in 2 months

more