ponewheel / android-ponewheel

pOneWheel Android app
MIT License
72 stars 25 forks source link

Android 4.4 support? #67

Closed ocornu closed 6 years ago

ocornu commented 6 years ago

I'm looking into cheap wrist Android phones, like the DM98 or LEM4, but most come only with Android 4.4. What's requiring Android 5.0+ in POnewheel?

kwatkins commented 6 years ago

You can try compiling it for an SDK lower, it might work. The BLE/Bluetooth stuff below Android 5.0 was so nutty we had to stop supporting it.

On Tue, Apr 10, 2018, 12:42 AM Olivier Cornu notifications@github.com wrote:

I'm looking into cheap wrist Android phones, like the DM98 https://www.aliexpress.com/item/Smartch-Original-DM98-Smart-Watch-MTK6572-3G-Smartwatch-900mAh-Battery-512MB-Ram-4GB-Rom-Camera-Bluetooth/32835711258.html?spm=a2g0s.13010208.99999999.269.mfRIVt or LEM4, but most come only with Android 4.4. What's requiring Android 5.0+ in POnewheel?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ponewheel/android-ponewheel/issues/67, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0LrZ2tCO-lzmZUqj5Dkpk8XmRPpZvVks5tnGJxgaJpZM4TNwJ6 .

ebabel commented 6 years ago

I bet you could spend a fair amount of time optimizing it for the cheaper phones with lower battery capacity and slower CPU. Neat idea though!

kwatkins commented 6 years ago

Yep. Hey @ocornu attached a version of master that should support 4.4/SDK 19, let us know if you test it and how it goes. You may have to add an ".apk" to the name. ponewheel-master-sdk19.zip

ocornu commented 6 years ago

Thanks kwatkins! I don't have the phone yet though: was investigating before i pull the trigger... Are you suggesting another option, ebabel?

I've developed in many languages, Java included, but I've never worked with Android. Should I expect a lot of difficulty? How long to get from zero to successfully compiling an APK you guys think?

kwatkins commented 6 years ago

The work of @ebabel and others made grabbing the source and compiling it smooth, and added some structure to the code. With the latest Android Studio IDE you shouldn't have any problems grabbing the source and compiling. I'd say give it a go, and let us know if you encounter any issues... !

-- Kevin

On Wed, Apr 11, 2018 at 12:36 AM, Olivier Cornu notifications@github.com wrote:

Thanks kwatkins! I don't have the phone yet though: was investigating before i pull the trigger... Are you suggesting I another option, ebabel?

I've developed in many languages, Java included, but I've never worked with Android. Should I expect a lot of difficulty? How long to get from zero to successfully compiling an APK you guys think?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ponewheel/android-ponewheel/issues/67#issuecomment-380357365, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0LrQhvuzS8q_nyqkRgfYCnIHj2zWOpks5tnbKUgaJpZM4TNwJ6 .

ebabel commented 6 years ago

Yeah for sure, the difficulty isn't in making your first app, its more about supporting old phones with BLE, or optimizing performance/battery drain. To be honest, its hard to say how our app would do on those phones, but I like @kwatkins's optimism!

audkar commented 6 years ago

Android 4.4 doesn't support BLE at all. [Doc link](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getBluetoothLeScanner()) This is mandatory method for application and it was added from android 5.0 (sdk 21) https://github.com/ponewheel/android-ponewheel/blob/0799bf50e5174cc2c3afbe47daee120c4c14393e/app/src/main/java/net/kwatts/powtools/util/BluetoothUtilImpl.java#L427-L432 I believe current code which exists in master branch will crash at run-time on android 4.4. Need to test this before release. And revert minSdk 19->21 if it is true.

audkar commented 6 years ago

@kwatkins @ebabel What do you think?

kwatkins commented 6 years ago

Sounds good to me.

On Sun, Jul 8, 2018, 6:46 AM Audrius Karosevicius notifications@github.com wrote:

@kwatkins https://github.com/kwatkins @ebabel https://github.com/ebabel What do you think?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ponewheel/android-ponewheel/issues/67#issuecomment-403288891, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0Lrf_gtepay7mD7GdGW9vGJjRXBF-Rks5uEg0XgaJpZM4TNwJ6 .

ebabel commented 6 years ago

Thanks for looking into that @audkar. I'm all for sticking with 21