Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
torb main
Jul 28, 2004

SELL SELL SELL

FAT32 SHAMER posted:

We had a hell of a time getting it to work and ended up just flashing the image to a physical mock head unit

Hello fellow automotive friend :) did you use an off the shelf dev kit, some proprietary OEM part from Harman/Conti/whoever, or some sort of reference board from, say, Nvidia?

Adbot
ADBOT LOVES YOU

FAT32 SHAMER
Aug 16, 2012



torb main posted:

Hello fellow automotive friend :) did you use an off the shelf dev kit, some proprietary OEM part from Harman/Conti/whoever, or some sort of reference board from, say, Nvidia?

we got some piece of poo poo chinesium head unit from amazon, lemme see if i can find it


e; oh that was easier than i thought: https://www.amazon.com/gp/slredirec...dgetName=sp_atf

idk how exactly they flashed it but it worked

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Dumb question, but could you ask the OEM what arguments to use when calling the emulator tool from the command line? If they insist it works, they've got to have a way to do it (though it might be specific to some jerkwad engineer)

FAT32 SHAMER
Aug 16, 2012



Volmarias posted:

Dumb question, but could you ask the OEM what arguments to use when calling the emulator tool from the command line? If they insist it works, they've got to have a way to do it (though it might be specific to some jerkwad engineer)

in my experience if you're dealing with the OEM they use the physical unit to do testing and don't bother with an emulator of any sort.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Sure, I guess I misread the original message. I read into it that they put out an image specifically with emulator support, but rereading shows that's not necessarily the case

brand engager
Mar 23, 2011

Does android studio's debugger work with native code? Maybe ours is just too busted for it to attach, but I haven't been able to get it working.

PokeJoe
Aug 24, 2004

hail cgatan


yes it does. are you sure the code you're break pointing is actually running?

Taffer
Oct 15, 2010


brand engager posted:

Does android studio's debugger work with native code? Maybe ours is just too busted for it to attach, but I haven't been able to get it working.

It does, but depending on how straightforward your native code setup is it can be difficult to get running. If you're writing and building all the code with AS it should work without much headache.

brand engager
Mar 23, 2011

PokeJoe posted:

yes it does. are you sure the code you're break pointing is actually running?

It wasn't even attaching to the process last time I tried

Shadow0
Jun 16, 2008


If to live in this style is to be eccentric, it must be confessed that there is something good in eccentricity.

Grimey Drawer
Is anyone else running into a bizarre issue where the layout editor in AndroidStudio shuffles everything in a layout whenever you modify something? Like even renaming a layout causes everything in it to sort themselves by their class. It's so bizarre, and also super annoying.

Edit: It also likes to refactor component names across files even when I say not to do that. I renamed deleteButton to deleteGroupButton and it asked if I wanted to refactor - "No (local only)". Build fails - it renamed all deleteButtons in every layout.

Shadow0 fucked around with this message at 12:44 on Sep 5, 2019

netcat
Apr 29, 2008
Does anyone know how to get the boot animation to display in landscape mode rather than portrait (for an AOSP build, Android 9)?

Our device is always in landscape mode -except- for the boot animation for some reason. It displays in portrait and when it is done the screen rotates to landscape. The image is made for landscape so it looks terrible.

FAT32 SHAMER
Aug 16, 2012



Shadow0 posted:

Is anyone else running into a bizarre issue where the layout editor in AndroidStudio shuffles everything in a layout whenever you modify something? Like even renaming a layout causes everything in it to sort themselves by their class. It's so bizarre, and also super annoying.

Edit: It also likes to refactor component names across files even when I say not to do that. I renamed deleteButton to deleteGroupButton and it asked if I wanted to refactor - "No (local only)". Build fails - it renamed all deleteButtons in every layout.

YES AND ITS DRIVING ME loving CRAZY WHEN WORKING WITH LINEAR LAYOUTS

I thought I was losing my mind

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

netcat posted:

Does anyone know how to get the boot animation to display in landscape mode rather than portrait (for an AOSP build, Android 9)?

Our device is always in landscape mode -except- for the boot animation for some reason. It displays in portrait and when it is done the screen rotates to landscape. The image is made for landscape so it looks terrible.

can you just... rotate the image?

Shadow0
Jun 16, 2008


If to live in this style is to be eccentric, it must be confessed that there is something good in eccentricity.

Grimey Drawer

FAT32 SHAMER posted:

I thought I was losing my mind

We can't be sure this isn't also happening.

Vesi
Jan 12, 2005

pikachu looking at?

FAT32 SHAMER posted:

YES AND ITS DRIVING ME loving CRAZY WHEN WORKING WITH LINEAR LAYOUTS

I thought I was losing my mind

I don't know if this is related but I use Code->Reformat Code a lot and I noticed it was rearranging tags making it useless for linearlayout

I fixed it by setting Settings->Editor->Code Style->XML->Set from...->Predefined Style->Android

PokeJoe
Aug 24, 2004

hail cgatan


Vesi posted:

I don't know if this is related but I use Code->Reformat Code a lot and I noticed it was rearranging tags making it useless for linearlayout

I fixed it by setting Settings->Editor->Code Style->XML->Set from...->Predefined Style->Android

Yeah same, I had to do this too. Very annoying

netcat
Apr 29, 2008

Lutha Mahtin posted:

can you just... rotate the image?

I mean, I guess... But there must be some way to have actual landscape at boot.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

netcat posted:

I mean, I guess... But there must be some way to have actual landscape at boot.

Maybe, but you're looking at boot code at that point. Rotating really is going to be your best bet unless you feel like Going On An Adventure.

Anne Bonny
Feb 26, 2019
Is there somewhere I can post my app for critique? Here? I just want to make sure it's at least somewhat functional on devices besides my own before I use it as a resume item.

FAT32 SHAMER
Aug 16, 2012



Anne Bonny posted:

Is there somewhere I can post my app for critique? Here? I just want to make sure it's at least somewhat functional on devices besides my own before I use it as a resume item.

You could post the github link and some of us may be keen to peek at it, but otherwise specific questions may be more readily answered than a code review

PokeJoe
Aug 24, 2004

hail cgatan


I'll take a look if you post it here. Is it on Google play?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
If you're not using device hardware like Bluetooth, use an emulator image or two of different phone types to test it out

Anne Bonny
Feb 26, 2019
It's a camera application. Thanks!

edit: Apparently my initial release was compatible with 0 devices. I've just submitted a new version which should show up soon.

Anne Bonny fucked around with this message at 05:51 on Oct 30, 2019

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Anne Bonny posted:

It's a camera application. Thanks!

"Your device isn't compatible with this version"

Pixel 3 XL

Somebody fucked around with this message at 00:19 on Nov 9, 2019

Sir Bobert Fishbone
Jan 16, 2006

Beebort

Volmarias posted:

"Your device isn't compatible with this version"

Pixel 3 XL

Same, Pixel 2

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

Anne Bonny posted:

edit: Apparently my initial release was compatible with 0 devices. I've just submitted a new version which should show up soon.

welcome to android development, chief

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
A few comments.

Play store still shows a "Not designed for children" warning. For utility apps there's no reason you should be restricting this.

Don't disable the back button.

DON'T DISABLE THE BACK BUTTON.

Follow the guidance on how to prompt users for permissions; don't let the permissions dialog be the first thing they see.

Give me a good reason why you need the full storage permission instead of app local storage or selecting photos via intent. For that matter, consider saving to a location that camera apps are aware of.

"Torch" is a British word for flashlight, consider localizing.

Guide dialog still shows in portrait even when holding on landscape

Glimm
Jul 27, 2005

Time is only gonna pass you by

Volmarias posted:


Play store still shows a "Not designed for children" warning. For utility apps there's no reason you should be restricting this.


I could be wrong but I think there's a lengthy review process and stringent requirements to be designed for children now. I tried it on my cartoony live wallpaper and it got rejected / still has that notice.

Infomaniac
Jul 3, 2007
Support Cartographers Without Borders
Checking in from a galaxy s9. Same stuff as above. Are you limiting the preview image quality seems limited. The preview is not clear/ sharp/ hd

Infomaniac
Jul 3, 2007
Support Cartographers Without Borders

Infomaniac posted:

Checking in from a galaxy s9. Same stuff as above. Are you limiting the preview image quality seems limited. The preview is not clear/ sharp/ hd

I did like the effect once i started snapping away.

Anne Bonny
Feb 26, 2019

Infomaniac posted:

Checking in from a galaxy s9. Same stuff as above. Are you limiting the preview image quality seems limited. The preview is not clear/ sharp/ hd

I limit the preview size to maximize the frame-rate. I am using OpenCV4Android in order to interface with the camera api and perform native image processing. I don't know if using the camera api directly would appreciably improve performance, but I'm not sure how to tell without doing a huge revision.

Anne Bonny fucked around with this message at 04:49 on Sep 18, 2019

Shadow0
Jun 16, 2008


If to live in this style is to be eccentric, it must be confessed that there is something good in eccentricity.

Grimey Drawer
I'm trying to give my app an option to pick the language, but it's proving to be a lot more difficult than I thought.

code:
Activity context = getActivity();
Locale locale = new Locale(languageToLoad);
Locale.setDefault(locale);

Configuration configuration = context.getResources().getConfiguration();
configuration.setLocale(locale);

//context.createConfigurationContext(configuration); // This does not seem to do anything

//context.getResources().updateConfiguration(configuration, context.getResources().getDisplayMetrics()); // This works, but is "depreciated"

context.recreate();
I'm also running into the issue that recreating the Activity breaks everything. The fragment doing the language setting is sitting in a ViewPager, and when the Activity gets remade, the ViewPager gets set to null, so when I change the page with a button, it crashes. It also does an annoying double blink thing while it's reloading, and only actually sets the language on the second time I set the language.

Is there a better way to do this?

Googling the problem gives me a lot of results how to change my phone settings. It's annoying sometimes that the language and the OS have the same name.

Vesi
Jan 12, 2005

pikachu looking at?

Shadow0 posted:

I'm trying to give my app an option to pick the language, but it's proving to be a lot more difficult than I thought.

code:
Activity context = getActivity();
Locale locale = new Locale(languageToLoad);
Locale.setDefault(locale);

Configuration configuration = context.getResources().getConfiguration();
configuration.setLocale(locale);

//context.createConfigurationContext(configuration); // This does not seem to do anything

//context.getResources().updateConfiguration(configuration, context.getResources().getDisplayMetrics()); // This works, but is "depreciated"

context.recreate();
I'm also running into the issue that recreating the Activity breaks everything. The fragment doing the language setting is sitting in a ViewPager, and when the Activity gets remade, the ViewPager gets set to null, so when I change the page with a button, it crashes. It also does an annoying double blink thing while it's reloading, and only actually sets the language on the second time I set the language.

Is there a better way to do this?

Googling the problem gives me a lot of results how to change my phone settings. It's annoying sometimes that the language and the OS have the same name.

The android way is to just let the OS decide the language but I've done this for testing purposes (API 24+ only):

code:
/**
 * to change language in activity:
override fun attachBaseContext(newBase: Context?) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && newBase != null) {
super.attachBaseContext(MyContextWrapper.wrap(newBase, Locale("fi")))
return
}
super.attachBaseContext(newBase)
}
 */

class MyContextWrapper(base: Context) : ContextWrapper(base) {
    companion object {
        @RequiresApi(Build.VERSION_CODES.N)
        fun wrap(context: Context, newLocale: Locale): MyContextWrapper {
            context.resources.configuration.setLocale(newLocale)
            val localeList = LocaleList(newLocale)
            LocaleList.setDefault(localeList)
            context.resources.configuration.setLocales(localeList)
            val ret = context.createConfigurationContext(context.resources.configuration)
            return MyContextWrapper(ret)
        }
    }
}

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
As above, you generally want to just let the language the user has chosen for their device be used. Is there a reason you want to let the user override it?

FAT32 SHAMER
Aug 16, 2012



I personally keep my phone in norwegian but some more complicated apps i'd prefer to use in english so I dont accidentally break stuff.

Shadow0
Jun 16, 2008


If to live in this style is to be eccentric, it must be confessed that there is something good in eccentricity.

Grimey Drawer
I've lived in a lot of places and have had to deal with a lot of computers which aren't in my native tongue, and it's super frustrating when you have no option to change the language on something. I recognize that sharing a phone is tremendously unlikely, but why not give users the option?

FAT32 SHAMER posted:

I personally keep my phone in norwegian but some more complicated apps i'd prefer to use in english so I dont accidentally break stuff.

Like this ^
You never know what kind of relationship the user has with a language. I meet a lot of people who have their phone in language X, but like to have something like Facebook in English for studying purposes.

Also the app is for myself, so I'm not super concerned about "best practice", haha.

PokeJoe
Aug 24, 2004

hail cgatan


Anne Bonny posted:

It's a camera application. Thanks!

edit: Apparently my initial release was compatible with 0 devices. I've just submitted a new version which should show up soon.

Cool camera effects. The UI isn't very intuitive and the guide could be more helpful but if it's just for you to use that stuff isn't so important.

Somebody fucked around with this message at 00:19 on Nov 9, 2019

Sereri
Sep 30, 2008

awwwrigami

https://www.xda-developers.com/google-chrome-no-longer-webview-provider-android-10/

Jesus loving christ

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

Hmm that's a weird bug - what release channel is your Trichrome on?

I guess at least there's a better chance of bugs being fixed before they hit Stable, but lol you know a bunch of people are gonna go on Canary just because

Adbot
ADBOT LOVES YOU

netcat
Apr 29, 2008
Is it possible to build Android with OEM unlocking enabled and dm-verity disabled by default? That does not involve hacking the uboot source and figuring out whatever magic the OEM unlocking service does? Or is it vendor specific?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply