[Q] Android Automation Testing - General Questions and Answers

I've an apk to be tested using Robotium. In the application I'm going to test, there is a custom view(Window) on which there are some text and numeric parameters drawn using ownerDrawn and Paint. The custom view is a child of the relative layout. Since I'm not able to get the resource id of the parameters drawn on the custom view,I'm finding it hard to test the existance of parameters and read the value of the parameter on that view. Please help me out with a solution on how would I do that.
The Custom View is similar to the one attached here.
Please suggest me if there is any other way to achieve this.
Thanks

Related

Some questions about cooking ROMs - Reg Tweak

I am absolutely new to ROM cooking stuff, I searched the Q & A section but did not find any thread related to the topics I was interested to know:
1. I want to incorporate certain registry tweaks in my ROM, which is somehow getting over written (to be exact I want to turn off all plugins except Home Screen plus plus clock ui and quick launcher). I have exported the registry settings and tried to incorporate in the ROM, but somehow they are getting over written. I want to know is there any way I can make a particular package (in this case my tweaks) get compiled into the ROM last, so that whatever I define there don't get over written.
2. I have found some great freeware like the finger friendly keyboard in this forum, when I try to integrate them into my ROM using Package Creator 5.4, it gives error saying duplicate files. however upon viewing the cab, I saw that the file names may be same, but they are placed in different folders , what is the way to do it.
Can some one help me out?
BTW I do not use any kitchen and I am talking about building for my Gene.
Thanks for the help.
No one wants to share his/her knowledge? Wow

Writing app, having trouble

Hey guys, I know this thread is probably better suited for the development thread, but I am not allowed to post there, so here goes:
I am working on improving the notepad app that is created through the notepad tutorial provided for android development, and at the moment I am trying to make a preferences page that allows me to enter a number, hit confirm, and the app will use that number to change the font. My approach so far has been to pass a startActivityForResult call, which returns a number, then in my onActivityResult I check for that number which should be returned. I then capture the result code, which should not be an integer, it has been parsed in the methods that were called. All that seems to be running fine, but when I try to use TextView to setTextSize my application is force closing, I have tried a few different ways of implementing this setTextSize method, including not using the variable that I am getting back (resultCode) at all, and instead just plugging in a preset number, but the application is still bombing as soon as I try to call setTextSize in any way. I wanted to see if there is anything special about the setTextSize that I may be missing, or if there is a better way of setting font size at run-time.
Thanks,
Nate
Does this help at all?
I did find that post through my searching, and even calling the setTextSize using pixels it still bombs out, here is my code for making the text larger:
fontSize = resultCode;
TextView tv;
tv = (TextView)findViewById(R.id.text1);
tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize);
I do not know if this matters or not, but the view that is being used is notes_row which is referenced by id text1, more importantly, notes_row is used to display the rows on the notes_list view.
Thanks for the help, I am new to android programming, and this is something I have had trouble with for the past 2 days.
OK well what does the stack trace look like? what errors are you getting? and i know you said you plugged in an actual number in place of the variable (just for testing), but how did you plug that number in? did you just use the number or did you use the Float or Integer object or what?
Unfortunately, I do not know what a stack trace is, if you could elaborate I would be very grateful.
When I plugged the number in directly I did it both by creating a variable of type float and assigning it a value, and using that variable in the method call, as well as just putting a number directly into the method call.
Bump. Can't figure out why a simple textview.settextsize would cause a force quit.
Sitrep: I figured out the problem with my code, but in the process caused another problem. Here is the deal, I was instantiating TextView with a view object, rather than a context, after switching the line that said TextView tv = new TextView( (TextView) findViewById(R.id.text1))) to TextView tv = new TextView(this). The problem with that is, I am trying to edit data that is in a pre-existing textview, declared in one of my xmls, and therefore creating a new one does not seem like the right way to be going, or maybe I just do not understand the way to do it.
Does anyone know a way for me to access my pre-existing TextView (created in my xml file) at run-time, or even a way to apply settings that I change on my new TextView to my pre-existing one. Is this possible or do I need to be looking for a different solution (someone suggested that I create a separate view for each text size that I want to create, and then once a user selects the text they want using a menu, just call the appropriate view) I would prefer to use a more elegant solution if possible.
Thanks for all the help so far,
Nate
Doing more reading, I see that I do in fact need to make my TextView = the one that is currently defined with the program, the problem with this is that when I put breakpoints right after where I declare this statement: TextView tv = (TextView) findViewById(R.id.text1); Under variables tv shows as a null, and I believe that is the reason that I getting the crash, I think the program is seeing null.setText...... instead of view.set....
To the top

need help

i modify framework.apk(some icons)but i don't know how to modify position to network name on lockscreen(i want to view network name in right side not on center of screen).any suggestion is welcome.
A precision of the ROM you extracted the framework(-res?).apk could help people to give you advices.
I used to modify this sort of package in an automated way with this website : http://uot.dakra.lt/ maybe you can get some techniques by applying some minor changes and compare the orignal and the version generated by the kitchen.
Good luck.

mtce-utils configuration help (intents)

Hello,
I am wondering whether anybody can provide some clarifications regarding the mtce-utils configuration. More precisely, I would like to know if it is possible to assign intents to hardware (SWC of front panel) keys, and if so, how.
I have set most things up in mtce-utils/settings.ini according to the built-in documentation (comments in the configuration file), including app_xxx type of assignments (of apps to keys). In the old days of Xposed-mtc-keys one could also use intent_xxx assignments to associate intents instead of apps; however these do not appear to work in mtce-utils (this, or I am doing something wrong).
So, my main question is, can intents be assigned to buttons using mtce-utils, and if so how? As a more general question, is there any further documentation available for this module other than the comments in the configuration file? Advice is much appreciated.
sbruda said:
Hello,
I am wondering whether anybody can provide some clarifications regarding the mtce-utils configuration. More precisely, I would like to know if it is possible to assign intents to hardware (SWC of front panel) keys, and if so, how.
I have set most things up in mtce-utils/settings.ini according to the built-in documentation (comments in the configuration file), including app_xxx type of assignments (of apps to keys). In the old days of Xposed-mtc-keys one could also use intent_xxx assignments to associate intents instead of apps; however these do not appear to work in mtce-utils (this, or I am doing something wrong).
So, my main question is, can intents be assigned to buttons using mtce-utils, and if so how? As a more general question, is there any further documentation available for this module other than the comments in the configuration file? Advice is much appreciated.
Click to expand...
Click to collapse
Did you ever get an answer? I would like to know the same thing. If you found a way to do that please send me a message
panteryx_26 said:
Did you ever get an answer? I would like to know the same thing. If you found a way to do that please send me a message
Click to expand...
Click to collapse
As a matter of fact I found this resource (thanks @Xorit); I don't speak Russian but Google Translate produces a decent result. I have not had the time to test it, but in a nutshell the old "intent_xxx = string" setting should continue to work as it did in the previous (and now obsolete) mtc-keys module.
Could one of you post the mcte utils module? Can't find it to download anywhere...
Thank you!
Here is xposed-mtce-utils.apk v1.12:
xposed-mtce-utils v1.12
jtrosky said:
Here is xposed-mtce-utils.apk v1.12:
xposed-mtce-utils v1.12
Click to expand...
Click to collapse
could you load it up one more time?
Hey guys,
I can't find a working download respectively no download source for the latest mtce-utils. Can some1 give me a hint or upload the file, please?
Thanks in advance...

Any crop library for Android in active development?

Hello,
I use https://github.com/igreenwood/SimpleCropView library but the development is dead. It has no zoom even.
I've tried to find a new one and found https://github.com/ArthurHub/Android-Image-Cropper and https://github.com/Yalantis/uCrop. They have zoom option but seems both are discontinued.
The issue is that one of libs doesn't provide the info about the current position of crop areah that is needed for batch crop
The second one doesn't provide a view. Instead starts a new activity. Doesn't fit the architecture and ux requirements.
I'm stuck now. Maybe somebody suggests a library for my purposes?
Bump.

Categories

Resources