yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] daxgirl:
Thank you [MENTION=5493353]Wuby986[/MENTION]!!! That's exactly what we have been saying for the last ... 5 pages? [MENTION=7041450]JonathanRAZ[/MENTION], read my last reply to you again. What I said was... you're capable of solving your problems. Because in the end you did all on your own! All we ask that YOU DO SOME WORK BEFORE POSTING!!! It takes time for us to go through your code, especially when you post the WRONG part of code (not the one with problem), like you did. We have asked this repeatedly, but hey... people take time to learn.

Oh and feel free to punish us by not posting. That is a real mature attitude ?
[Android Apps and Games] daxgirl:
You sir are making wonders!!!
[Android Apps and Games] daxgirl:
When do you make the restore,? On first boot or when open the app?
[Android Apps and Games] Er. Aditya:
thankyou anna , see i finished the module and made changes and made a backup of few things like clock and colors ...then changed to those colors back to stock and restored my backup and bang everything was awesome

then i started to work on ui and clean flashed the rom with my new rom control and now it has stopped working again , dsnt even creates a backup folder
[Android Apps and Games] daxgirl:
That's interesting... are you on MM? And was your previous rom mm? Because on mm this thing is very different... we will need to remake the module for backup and restore... can't create folder on storage on mm unless user gives explicit permission.
[Android Apps and Games] Er. Aditya:
Yes ma'am on MM ATM..and tested it on MM all the time..do you think that clean flashes change any perms to make this module not work ?
[Android Apps and Games] daxgirl:
Well... for now for mm this module is not supposed to work much, especially if built for target 23. Maybe it would work if installed in priv app. But that remains to be seen.

In general, the backup and restore is a baby we are still nurturing, it has many things to be done. Including adopting for mm. Because of usage of storage partition. In the next update it might be more mature. Wuby still has ideas about making it better and better....
[Android Apps and Games] Er. Aditya:
I'll keep digging more and find the culprit no matter how many tests I have to do

Thanks Anna n wuby gn guys
[Android Apps and Games] daxgirl:
Are you installing it in system when you test? Did you update gradle to target sdk 23? Also adding some log statements can be useful. Especially to the oart of su async task which creates the folder. In general... the problem is I think permission to write storage on mm. But I might be wrong.
[Android Apps and Games] JonathanRAZ:
I know i did understand i am capable just did not look enough and instead posted something that was easy and code is not difficult just gotta look enough and try fix anything and look before i mean it was not really a problem what i did.....and sorry for my last post
[Android Apps and Games] Er. Aditya:
Yes Anna straight into priv-app

Updated the target to 23 ..I'll try to ad log once im on laptop

But again it worked nicely but may be its clean flash or something else that messed it up
[Android Apps and Games] daxgirl:
Alrighty... so you lost permission after wiping. Let us check that. [MENTION=5493353]Wuby986[/MENTION] mentioned something last night about 23 specific permission for system apps as we gossipped about you last night. Lol. Maybe he has a suggestion.
[Android Apps and Games] Er. Aditya:
Lol about me ? *looks here n there* :D

Anna I just started fresh ROM control and just added backup restore took about 5 mins and then again I tried clean flash and bingo its working like a charm ...so there must be something else of my stupidity..and please any suggestions from you guys would be amazing

I'll too keep u updated
[Android Apps and Games] daxgirl:
Lol yeah about you..

And yes one of the options we suggested is that we never know what can happen when a dev says they all of a sudden have broken feature. So many things can go wrong.

Really glad it works for you now. Also proves system apps on mm don't need to request storage permission manually. And seriously cudos for redoing the entire source. Wow.
[Android Apps and Games] Er. Aditya:
so after many tests i have figured its a permission error anna , i am really sorry for my stupidity

what exaactly i was doing :

i added backup module when my sdk version and build tools were set to 22.1.1 and blah blah

so it dint asked for storage at that moment but after that when adding changelog it asks us to upgrade to 23 , at that very moment it breaks the module

one can easily grant perms in settings and it works just fine after that , sorry again for my mistake
[Android Apps and Games] daxgirl:
That was what I was worried about. We will add mandatory request for permission. If you want to share your current source on git and make me a collaborator I will add the permission request to your activity for mm. As general rule it's a good practice to keep your sources on git. Will make it easier for us to debug and look at your code changes. Please have a look at the repo by Phronesis rom managed by [MENTION=3026895]DaOldMan[/MENTION]!!! That repo has more detailed changelog activity than Google source for android!!! And believe me... working with Thomas's repo is a pleasure. I can always look and debug his work. https://github.com/Da-OldMan/CustomSettingsForDevs/tree/Phronesis_V4_Romcontrol really exemplary work with github!!!!!!!

Thanks!

Sent from my SM-N920C using transporter...
[Android Apps and Games] Er. Aditya:
my internet is a bit slow , just pushing sources on github ...please wait a little and bear my ultra fast internet :')
[Android Apps and Games] daxgirl:
Wuby is now running some tests specifically for system app permissions in mm. Let's see what we get from that.
[Android Apps and Games] Er. Aditya:
yey :D my sources ma'am

Git Sources

how do i make you collaborator ?
[Android Apps and Games] daxgirl:
Wait for now for wuby to finish his digging. In general, you go to settings of your repository and add collaborators.
[Android Apps and Games] Er. Aditya:
done anna waiting for you guys now :)
[Android Apps and Games] Wuby986:
hey there!! sorry for delay.. today was a nightmare at work..

so i solved the issue in a quite "elegant" way i think.. at least we don't need to show anymore popup to allow the app to write to sdcard..

wanna try? i have all set to sdk 23 (compile, minimum, and target sdk as well as all library)

what i did was removing the pre-sdk 23 permission for "write_external_storage" with this one:

<uses-permission-sdk-23 android:name="android.permission.WRITE_MEDIA_STORAGE" />

must be pushed into system/priv-app
[Android Apps and Games] Er. Aditya:
ur asking me :D on my way dint even complete the apps restore :))

[MENTION=5493353]Wuby986[/MENTION] [MENTION=4714483]daxgirl[/MENTION] awesomeeeeeeeeeeeeeeeeeeeee this has worked like a charm :D
[Android Apps and Games] daxgirl:
All credits to [MENTION=5493353]Wuby986[/MENTION] and Valentino Rossi. Cheers to team work ?????????????
[Android Apps and Games] Er. Aditya:
god bless them both and the yamaha demon machine as well :D
[Android Apps and Games] daxgirl:
I am very ambivalent towards the yamaha demon following last weekend's events..

But definitely God bless them both... ???
[Android Apps and Games] Er. Aditya:
so if you had to make a choice anna

doc

or

lorenzo

:P

a simple question between i am trying to get naviigation bar > item background , for now its transparent when selected i want to use solid color , nothing seems to be there in drawer xml
[Android Apps and Games] daxgirl:
You said lorenzo on this thread you go away...... ???

As for your question, we can create drawable selector and implement like we implement the color selector for text color and image color.

Really????? Lorenzo????????? Go away and never come back ???????
[Android Apps and Games] Er. Aditya:
lol i just wanted to capture your reactions :D valentino rossi is the undisputed GOD of motogp and he will remain that way till Motogp lives
[Android Apps and Games] daxgirl:
OK. You're forgiven.

Wuby was getting ready to bring flowers to your grave btw...
[Android Apps and Games] Wuby986:
Does restore work for you?

And for next time if you want to have an answer (polite answer ? because you'll get one but won't be polite) i strongly suggest to not mention lorenzo on the tread anymore looooooool

Inviato dal mio SM-G935F utilizzando Tapatalk
[Android Apps and Games] Er. Aditya:
i have been a fan of rossi myself since day 1 , many came and went away hayden , cappirossi and blah blah n some more blah...but this guy is something else.

restore works like a charm sir

ohhh master i beg for forgivness :P
[Android Apps and Games] daxgirl:
Yeah he mentioned it works... which is how we got to the motogp discussion. I said you had team work with Vale.
[Android Apps and Games] daxgirl:
[MENTION=5493353]Wuby986[/MENTION] you found your soulmate ?. I mean other than me... ???
[Android Apps and Games] Er. Aditya:
i used to see cappirossi dominate on a straight run on a ducati power but when it came to rough turn rossi was like ***** please :laugh::highfive:
[Android Apps and Games] Wuby986:
Oh ok i missed that

Well i can bet there are many other around...! And i already know i won't loose the bet ???

Inviato dal mio SM-G935F utilizzando Tapatalk

I guess we should really start a motogp discussion before we have to change the title to this one ?? hangout? Who wanna join? Send pm with email :)
[Android Apps and Games] Er. Aditya:
when in the same camp , there's no bet :)
[Android Apps and Games] asc1977:
Hey Rom Control devs,

Thanls agaim for your great work for this app. I learned more and more about custumize my rom control. I cant stop adding more and more.

One simple question i have and i readed before but didnt find the answer. If i open the app this screen appears

But i didnt want. I want to have the navdrawer see that screen

Is there a possibility to have that with a simple change?

Thx in advance

Gesendet von meinem SM-G925F mit Tapatalk
[Android Apps and Games] Wuby986:
by google guidelines you don't want that.. navdrawer will automatically open only till "user learns", which mean before you open it manually it will always open when you open the app, to let you know it's there, then when you manually open it once you won't see it unless you press it.. you can set it to be always open..

by google guidelines it saves a boolean in shared prefs

you have to search for the onDrawerOpen method in NavigationDrawerFragment.java and you just want to delete the putBoolean
[Android Apps and Games] asc1977:
ok, i tried now several times with different changes but if i open app its not changed. can you give me the right changes please, i become crazy

mActionBarDrawerToggle = new ActionBarDrawerToggle(getActivity(), mDrawerLayout, toolbar, R.string.drawer_open, R.string.drawer_close) {
@Override
public void onDrawerClosed(View drawerView) {
super.onDrawerClosed(drawerView);
if (!isAdded()) return;

getActivity().invalidateOptionsMenu(); // calls onPrepareOptionsMenu()
}

@Override
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
if (!isAdded()) return;
if (!mUserLearnedDrawer) {
mUserLearnedDrawer = true;
SharedPreferences sp = PreferenceManager
.getDefaultSharedPreferences(getActivity());
sp.edit().putBoolean(PREF_USER_LEARNED_DRAWER, true).apply();
}
getActivity().invalidateOptionsMenu(); // calls onPrepareOptionsMenu()
}
};

and please a second part. i changed the design of app complete with the colors but one i didnt find. the color where is written the android summary like hide or shown. please tell me
[Android Apps and Games] daxgirl:
Delete the line where preference manager puts boolean true into key USER_LEARNT_DRAWER and wipe data to the app.

As for color changes, android summary for preferences is color secondary style in compat design.

As for you going crazy... well... not a Shocker.
[Android Apps and Games] asc1977:
Ah ok. Wipe data i didnt do. If i do its clear. But please help again for color. I didnt undestand your meaning. I find nowhere secondery. Can you tell me which file like color.xml or styles.xml and which one line colorPrimaryDark or or. I tried so much colors

Gesendet von meinem SM-G925F mit Tapatalk
[Android Apps and Games] daxgirl:
I can give you an answer. But I would really like for you to learn how to help yourself.

Please google "change preference summary color app compat android" and look for answers in stackoverflow.
[Android Apps and Games] asc1977:
Ok. I will try. I want to learn and not only answers. I take my time for that

Gesendet von meinem SM-G925F mit Tapatalk

---------- Post added at 15:45 ---------- Previous post was at 15:29 ----------

I find that part in web but i didnt find in app. If you can show me where and what i think its clearer for me for the futur

Gesendet von meinem SM-G925F mit Tapatalk
[Android Apps and Games] daxgirl:
In our app we don't override secondary color of text for themes. Since you want to change it you need to override the default value. That means to add an item to both themes.

You can see themes have parents and each parent is a huge combo of attributes in compat library. One of them is textColorSecondary. You need to add item with name android:textColorSecondary to both themes in styles and give it a color you want for each theme. Or same color if you want same color for light and dark theme.
[Android Apps and Games] asc1977:
Yes now its clear. I searched for secondary but didnt find. But if you didnt add i cant find. But i learned now that i can add it simply. Thats a knowledge you must habe but if you havent amy time in your learning live anything to do with programming and must learn now all new with 39Years its hard. Thanks anyway for your help

Gesendet von meinem SM-G925F mit Tapatalk
[Android Apps and Games] daxgirl:
I am same age as you. And learning new things is a choice. You can do it. Just like I did.
[Android Apps and Games] asc1977:
I do it and learned so much last times

Gesendet von meinem SM-G925F mit Tapatalk
[Android Apps and Games] Martillero:
Learning is not a matter of age. Is a matter of patience, time and willing to learn.

Yeah, we, the old dudes, maybe have less time to do it cause of life, but we definetly can.

If you really want lo learn, you have 2 ways, the easy way is asking but once you know the answer automatically you will thing "ah, this is too easy", if you find it for yourself instead (second way) you will appreciate the work and time you have spend, and you will value that new knowledge aquired a lot more.

This is a principle of life, we always will value those things hard to get more than those we consider for granted.

When we were on school or college and we were intrigued for a subject or a particular topic, we went to the library and tried to learn more about that using other books. The same applies here, xda is not the only place we can learn, in fact if you want lo learn development stuff you should check stackoverflow.

And im also a proud memeber of the 30's club ;)

I was out this last days and have seen so much new things going on here, great work guys, to all!

This is definetly one of the most enjoyable threads for me, along with td's too.

Keep on rocking :highfive:
[Android Apps and Games] daxgirl:
Nah it's most enjoyable because if you, bro! ?

Also, you've seen many new things? Lol... we almost changed the name of the thread to MotoGP Central last night... luckily wuby took us both to private on time ?
[Android Apps and Games] Er. Aditya:
Lol who u n ??? Lorenzo ?? :'D *scared to death*
[Android Apps and Games] asc1977:
I search for a possibility to switch in xml between two android:key and not between on or off or 1 and 0. Google and Stackoverflow cant help me so after one hour i decided to ask. A link where its written is enough. Not the answer [emoji12]

I have traffic_left on/off switch and traffic_right on/off switch and want to marry them in one with a switch or a list. If one is choosed you cant choose tve other

Gesendet von meinem SM-G925F mit Tapatalk
[Android Apps and Games] Er. Aditya:
You dont have to explain everytime how hard youtried bro :)
[Android Apps and Games] daxgirl:
From what I understand your best choice is a little preference. F.e...

Right lock 1

Left lock 2

No lock 3

OR something of sorts...

Is that what you mean?
[Android Apps and Games] asc1977:
Yes but so often here was write that most only ask and not work for that and i mean that also me is like that. I think the writers means me too. I tried to learn and do some tests but dont work. I am not anymore a noob i think but i think i ask to much or isnt

Gesendet von meinem SM-G925F mit Tapatalk

---------- Post added at 19:29 ---------- Previous post was at 19:25 ----------

yes, i read here for a solution and tried similar way but no changes.

thats how i tried

Arrays

<string-array name="trafficpos">
<item>left</item>
<item>right</item>
</string-array>
<string-array name="trafficposval">
<item>lefttraffic</item>
<item>righttraffic</item>
</string-array>

xml

<com.wubydax.romcontrol.prefs.MyListPreference android:entries="@array/trafficpos" android:title="Traffic Position" android:key="@array/trafficposval" android:summary="%s" android:entryValues="@array/trafficposval" />
[Android Apps and Games] Martillero:
Yeah, but that's not the best approach, can be done with rc making one switch makes off the other one but those things should be made in systemUi itself. You can use same key for both mods, and use the conditions at your advantage, i have done it in the past to link two methods.

For ex. if your key is let's say left_traffic and the other one right_traffic use the same key something like just_traffic on both methods, and use if-lez (<=0) in one and if-nez (nonzero) in the other one.

Of course you can do this in other proper ways, like using a const value 0x1 ,0x2, 0x3 or whatever u want (and if-eq) for the condition. Or can use addview removeview from the same method but that way with the condiftions will work too.
[Android Apps and Games] daxgirl:
I think most important question is what your observer does with the data. If the observer reacts to 4 conditions, like left, right, center and none, its better to do it with list preference.

The problem is most probably in your original mod and observer. Which we don't discuss here. Any way what matters for our purpose is what message you wanna send to observer and how. And for that purpose, it really doesn't matter how you organise your preference.

Frankly speaking though, b when you have more than 2 options, the best way is list presence.
[Android Apps and Games] asc1977:
Confused now but i try to do

Gesendet von meinem SM-G925F mit Tapatalk

---------- Post added at 19:53 ---------- Previous post was at 19:53 ----------

I take a look in my smalis to do that and than take a list preference. I go on to rry to manage

Gesendet von meinem SM-G925F mit Tapatalk
[Android Apps and Games] daxgirl:
Let me ask you this... is your mod taking string or integer from content provider? What are the values it uses? Is it 0.. 1... and so on or is it a string?
[Android Apps and Games] Er. Aditya:
When thats written i consider myself first for whom its written :D and i am cool with that u should be too... enjoy your work and keep working hard
[Android Apps and Games] Martillero:
If you use the method that everybody use for visibility by id, try to do this: Change both keys, and use the same on both methods. Then in this part:

move-result vx

if-nez vx, :cond_x

Use if-nez in one of the methods, and if-lez on the other one. That's it. That will change between both.
[Android Apps and Games] daxgirl:
You're right of course, but I think you're rushing things to where no man has gone before... and by that I mean to where asc1977 hasn't gone before. I believe we have a case of not understanding the mod by the modder. Which is what I am trying to establish.
[Android Apps and Games] Martillero:
You are always right my friend :good:

Now i read my message, it's barely understandable :(
[Android Apps and Games] daxgirl:
Well it's understandable to me if it's any concsolation...
[Android Apps and Games] asc1977:
[MENTION=4714483]daxgirl[/MENTION] [MENTION=4830018]Martillero[/MENTION]

i understand both of you and your meanings and tried but it wont work

methods

.method LeftTraffic()V
.locals 7

iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v1

const-string v2, "trafficpos"

const/4 v3, 0x0

invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v1

if-nez v1, :cond_0

const v3, 0x8

iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

const v6, 0x7f0e036b

invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

move-result-object v4

invoke-virtual {v4, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

goto/16 :goto_0

:cond_0
const v3, 0x3

iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

const v6, 0x7f0e036b

invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

move-result-object v4

invoke-virtual {v4, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

:goto_0
return-void
.end method

.method RightTraffic()V
.locals 7

iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v1

const-string v2, "trafficpos"

const/4 v3, 0x0

invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v1

if-lez v1, :cond_0

const v3, 0x8

iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

const v6, 0x7f0e036d

invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

move-result-object v4

invoke-virtual {v4, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

goto/16 :goto_0

:cond_0
const v3, 0x3

iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

const v6, 0x7f0e036d

invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

move-result-object v4

invoke-virtual {v4, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

:goto_0
return-void
.end method

RomControl

<SwitchPreference android:title="Traffic Position" android:key="trafficpos" android:summaryOn="right" android:summaryOff="left" android:dependency="tweaks_speed_view" />
[Android Apps and Games] daxgirl:
See that's your problem. When you try list preference your array of values are not numbers. You for some reason used strings. You need to use array of strings with values like "0" and "1"... and so on.