I have a query involving 3 tables. There are 2 columns in the main table that contain code values in which each value has an associated description in the other 2 tables. This query is simple and works correctly if done as a raw query, but I'm using a contentprovider based query. The query looks like this:
SELECT col1, col2, col3, col4, col5, col6, col7 FROM T1, T2, T3 WHERE T1.col3value = T2.value AND T1.col4value = T3.value AND T1.col1 = some user supplied search value. For some reason I'm getting run time exceptions such as 'unknown column names' and 'ambiguous column names'. Tables T2 and T3 have exactly the same column names. I've seen solutions that resolve this by using a column map represented by a HashMap. I'm not sure how this would work and what the keys and values should be in this map.
I would appreciate some help with this, particularly a good example. Thanks.
Related
how to display operator name "hutch" rather than its code "40488" in home plugin on its top left corner in roms like crystal v2 and touch VII unlike transformer 1.1 which already has it displayed
Use any Registry Editor software, and navigate to...
HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\RIL\OPERATORNAMES
create a "String Value" with
Name as 40488
and String as Hutch
Softreset...
BR
Ajubaba
Guys, I found this solution.
try this reg tweak
hklm/software/htc/ril/rilconfig/EnableSpnOnsEonsFeature change from "2" to "8"
I hope this helps
thanks
EnableSpnOnsEonsFeature is a Registry-Entry of the GMS Module. Found in HKLM\Drivers\BuiltIn\RIL.
Spn is short for "Service Provider Name", Ons is short for "Operator Name String", Eons is short for "Enhanced Operator Name String", all taken from GSM Standards Documents. Enabling the feature, ie setting the value of that entry to 1, will allow your phone to download the name of the GSM Network you are currently logged in to from the provider.
kamalneet said:
thanks
EnableSpnOnsEonsFeature is a Registry-Entry of the GMS Module. Found in HKLM\Drivers\BuiltIn\RIL.
Spn is short for "Service Provider Name", Ons is short for "Operator Name String", Eons is short for "Enhanced Operator Name String", all taken from GSM Standards Documents. Enabling the feature, ie setting the value of that entry to 1, will allow your phone to download the name of the GSM Network you are currently logged in to from the provider.
Click to expand...
Click to collapse
Kamalneet,
I am slightly confused between your suggestion and that given by eddyve
Guys, I found this solution.
try this reg tweak
hklm/software/htc/ril/rilconfig/EnableSpnOnsEonsFeature change from "2" to "8"
I hope this helps
Click to expand...
Click to collapse
I could not find EnableSpnOnsEonsFeature in HKLM\Drivers\BuiltIn\RIL, but it was found in hklm/software/htc/ril/rilconfig/ .
Eddyve says to change from 2 to 8. You are asking to change 1.
Which is the correct option that works?
Much appreciated.
i only used this part from screen shots which ever number you see in home plugin ,just feed it here go to
HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\RIL\OPERATOR NAMES
there create new string with
name 40488 and value Hutch
or name 40402 and value Airtel
i did not use hklm/software/htc/ril/rilconfig/EnableSpnOnsEonsFeature although i read some where definitely the value was 1 but these value have to be created i think you have to create EnableSpnOnsEonsFeature folder then put a default binary Dwords decimal value as 1 but i don't remember that now although first part i remember carefully
ajubaba said:
Use any Registry Editor software, and navigate to...
HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\RIL\OPERATORNAMES
create a "String Value" with
Name as 40488
and String as Hutch
Softreset...
BR
Ajubaba
Click to expand...
Click to collapse
Thanks alot it worked gr8 for me... i added airtel. Vodafone. n idea n all avaible operator to it.. thanks alot again
If anyone want to know his operator code and matching the operator name here is the link:
http://en.wikipedia.org/wiki/Mobile_Network_Code
Hi, all,
Sorry if this is not the perfect place, but I really need some help here. I'm using this barcode generator to print an EAN-128barcode image, but here's the thing:
I'm inputing
Linear EAN-128= new Linear();
EAN-128 Data = "12345678912";
EAN-128.X = 3;
EAN-128.BarcodeWidth = 120;
But the generated EAN-128 image is always larger than the width that I want, anybody know why?
Here's the tutorial, EAN-128 (GS1-128) Barcode Add-In for NET
I just wanna program this add-in into a barcode generator.
search on google play/market..
You should change some margin parameters, if not, the barcode images can not be displaied correctly.I recommend this barcode generator in RESTEREDGE.COM to you, you can have a try.
Hello everyone,
I'm new to Android development. I've written my first little "get my feet wet" ap and am looking to expand on it. One thing I would like to do it give the user more options of things they can configure and I'm wondering about the best way to store that information.
At what point does it become worthwhile to start using mySQL vs just using string data in the prefrences? Or is there another option I've missed (maybe an xml file, but I'm not sure where that would be stored?).
In my case, I'm thinking I have fewer than 100 instances of an object (or objects) that would have 3 or 4 properties associated with them.
Thanks!
Use the SharedPreferences class, is the easiest way to achieve your goal (BTW, SharedPreferences generate a xml file to storing your preferences).
SharedPrefrences is what I used for my basic version, but my understanding is that it allows for name-value pairs right? That works well when you have a predetermined set of prefrences, but what if it's more fluid?
Say I want to allow the user to configure his widgits, and each widget has a number of properties - say "color", "number", and "size". Maybe one user will configure 3 widgets and another user might configure 25.
I can think of a couple of different ways to parse this out into name-value pairs, but is that the best way?
Yep... for me that is the best way. For each user you can put the values using someting like this:
UserName+WidgetID+"PreferenceName"
And thats all... the preferences will be unique for each case, without parsing and 0 errors
Ok, cool. That's one of the options I had considered but didn't know if that would be the most efficient. Of course I'd also have to have a list of all the "Widget ID's" stored in a preference to loop through as well.
I assume the maximum amount of data that can be stored in one prefrence is just whatever the Java max string length is...is that correct?
Yes, you're right
To get a list of all playlists, I do the following:
Code:
String[] projection1 = { MediaStore.Audio.Playlists._ID, MediaStore.Audio.Playlists.NAME };
Cursor cursor = myActivity.getContentResolver().query(MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, projection1, null, null, null);
On my JellyBean device (API16), every thing works fine. Subsequent queries on contained songs in each playlist also works as expected.
On my Gingerbread device (API10), the resulting cursor keeps empty, despite having created several playlists in the standard music player.
Are playlists stored differently in older APIs? Or has DB structure changed? Querying the audiofiles (MediaStore.Audio.Media.EXTERNAL_CONTENT_URI) works well on both devices. I'm compiling with min. API 8.
Any hint would be greatly appreciated!
*ping*
Seriously, nobody has an idea?
(Could an admin please put this thread into the right forum, as I am not yet allowed to. Otherwise, I doubt it has a chance of being read by the relevant audience. Thanks!)
I have written code using tcl/tk for quite some time and I would not have much problem writing this code (actually, I have written a very similar code before) but since Android is Java I will have to educate myself before I try to build this app. What I am trying to find out is how much will I have to educate myself before I can pull this thru. Learning to write code in tcl/tc did not took me long and I actually did a lot of learning while writing code so again, not having experience in java I am seeking the feed back of those that are currently way ahead of me to give me a better feel of what I am getting into... :victory:
This app will be based in a program built for windows. I have thru the years ask the vendor if they are going to port it to android and I always get the same response, "in a few months"...
Here is what I am looking forward to build...
Overview
Need to create an Android app that will consist of an UI and data processing terminal to communicate with a serial device. The terminal will be capable of sending commands to the serial device to gather information, process the information and then display it in human understandable terms.
Goals
Basic program:
* Create communication with a FTDI chip at 1200 Baud Rate, 8 data bits, No Parity, 1 stop bits and xon/xoff flow control, I have prove it to work with no control since the amount and rate of data is so small.
* Capable to send hex ascci commands, receive a dump in hex ascci then translate that hex ascci dump into decimal format for processing. The serial device communication and hardware cannot be changed. Most all commands are set but there is one command that the value will change depending on previous data found.
Example of communication:
send :000000037D (status command)
Response:
Hex/ascii -> decimal
:0401010C2A0094 -> 4 1 1 12 42 0 148
:0401010C9A0489 -> 4 1 1 12 154 4 137
In this example column 2, 3, 5 and 6 has the data I need and will have to process to display the final values.
* Status command should have option to be controlled with a timer with options for 1, 5, 20, 40 sec and Timer off. There should be a button on the UI to send that status command, also, the ability in the future for the command to be microphone driven (x amplitude loud noise will trigger command).
UI:
* Dark colors to keep the display from eating up the battery.
* Should turn off the display every 10 seconds and should come up on new data, mic driven or phone shake.
* Should have a display where the last data numbers will be displayed. Also to have the ability to create a second larger display with the same last data numbers.
* Need 8 buttons for commands, drop down menu for settings (timer settings) and exit button.
* There should be a space (table) to display data, up to 99 records. It should look more like a excel spread sheet with just 2 column. These columns will bet the data location and the data itself. The table should be able to hold about XX amount of records, if it gets larger then a scroll bar should be used to navigate up and down the table.
Enhanced program
Display altitude/barometric pressure on request(capable phones).
Future:
Right now the device talks to the computer via a serial/usb dongle but I am planning to build the hardware to make it Bluetooth capable but in very few odd instances I might have to run it with the dongle due to the distance between the device and the phone might exceed the most common 30 feet Bluetooth maximum distance.
Im tired of taking my pc to a dusty and pc unfriendly environment so I have decided to take the plunge and build the app myself. Learning Java and android will be beneficial as I can see me in the future building more apps for personal use .
As it is now I can control this device using a hyper-terminal in my Samsung Note. Problem is having to type the commands manually, getting the responses back, translating those hex responses to decimal then building the response... too much work by hand...
Currently im using Slick USB Serial Terminal. Although they have a paid version that could help with the commands it will still leave me with processing the response by hand. It is useful when all I want is to advance the display on the device as it is the most used command but still at times it is imperative to get the status from the system and I am back to square one. And if I wanted a full status report It would take me nearly an hour to process by hand...
I have bought these books:
Java All-In-One for Dummies 3rd edition.
Programing Android, O'Reilly, 2nd edition.
Beginning Android 4, Application Development, Wei-Meng Lee, seems to be 1st edition.
Android application development for java programers, James C Sheusi, also seems to be 1st edition.
Anyone care to comment or recommend a book or a website?
Thanks everyone! You will be seeing much more of me as soon as I start having questions!!! lol!
Is my English really that bad? lol!!!
kinda hard to believe no one can answer this question here. moving on.
Probably this that you may be looking for.
Save time on re-inventing the wheels, or you can decompile theirs.
one of the hyperterminals I been using provides their source so Im not too worried about that. I did not knew you could decompile and app. Anyways, thanks for your reply.