mostafa0050 / apndroid

Automatically exported from code.google.com/p/apndroid
1 stars 0 forks source link

apndroid should allow mms #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
APNdroid should allow MMS.

One should be able to select an option (setting) in APNdroid to be able to
send and receive MMS.

Original issue reported on code.google.com by paulo.cabido@gmail.com on 14 Aug 2009 at 3:48

GoogleCodeExporter commented 9 years ago
Well it is possible to enable mms by removing the suffix from the name and 
type. This
should be a easy feature to add, checking if the APN type is mms should be the 
solution.
Also it would be nice to add an option to allow mms and if enabled APNdroid 
shouldn't
change the apn with type equal to mms.

Original comment by paulo.cabido@gmail.com on 19 Aug 2009 at 10:40

GoogleCodeExporter commented 9 years ago
I was quickly looking at the code and possible patch seemed to be quite simple. 
When I 
ran it for the first time (on emulator) I really saw type=mms on several APNs. 
But 
since then there were always just some numbers. I don't understand what 
happened, I 
will need to look at it one again.

Original comment by martin.adamek on 20 Aug 2009 at 5:49

GoogleCodeExporter commented 9 years ago
On the method bgDisableAllInDb(ContentResolver contentResolver) I tryed 
printing out
the output of the apn type with Log.v("APNdroid-Log", apnInfo.type); and got the
correct apn type in text (using the emulator).
But when I try to use the string like apnInfo.type.compareTo("mms") the app 
always
crashes.. I'm having some trouble using the debugger but will continue trying.

Original comment by paulo.cabido@gmail.com on 20 Aug 2009 at 5:58

GoogleCodeExporter commented 9 years ago
got the debugger to work and solved the problems.
This change to the code actually works:

static void bgDisableAllInDb(ContentResolver contentResolver) {
        List<ApnInfo> apns = bgGetApnMap(contentResolver);
        for (ApnInfo apnInfo : apns) {
            ContentValues values = new ContentValues();
            if (apnInfo.type != null) {
                if (apnInfo.type.toLowerCase().compareTo("mms") != 0) {
                    String newApnName = NameUtil.addSuffixIfNotPresent(apnInfo.apn);
                    values.put(APN, newApnName);
                    String newApnType = NameUtil.addSuffixIfNotPresent(apnInfo.type);
                    values.put(TYPE, newApnType);
                    contentResolver.update(CONTENT_URI, values, ID + "=?", new String[] {
apnInfo.id });
                }
            }
            else {
                String newApnName = NameUtil.addSuffixIfNotPresent(apnInfo.apn);
                values.put(APN, newApnName);
                String newApnType = NameUtil.addSuffixIfNotPresent(apnInfo.type);
                values.put(TYPE, newApnType);
                contentResolver.update(CONTENT_URI, values, ID + "=?", new String[] {
apnInfo.id });
            }
        }
    }

I didn't apply any patch but I can do one if you want me to. The reason I 
didn't do
it is because I don't know witch way you want to go with the UI.
Personally I like it this way
http://martin.adamek.sk/wp-content/uploads/apndroid02-200x300.png, APNdroid can 
let
users chose witch APN types they want to disable/enable.

Original comment by paulo.cabido@gmail.com on 20 Aug 2009 at 6:13

GoogleCodeExporter commented 9 years ago
Are you sure that the patch need a UI change?
If so in my opinion (user) a "leave mms enabled" checkbox is enough

Original comment by nicolo.c...@gmail.com on 8 Sep 2009 at 10:11

GoogleCodeExporter commented 9 years ago
Yes, because some users may want to disable all APNs.
Anyway I have a HTC Magic and I recently moved on to a Hero based ROM, no need 
for
apndroid there as it has an option for this.
My contribution to this project is that modified function above. It works, I was
using it but it needs some changes to see if a mms options is selected or not.

Original comment by paulo.cabido@gmail.com on 8 Sep 2009 at 10:57

GoogleCodeExporter commented 9 years ago

Original comment by zeldigas on 9 Oct 2009 at 2:39

GoogleCodeExporter commented 9 years ago
fixed completely in
http://code.google.com/p/apndroid/source/detail?r=2a6ae4aff095d47ca21a6b76c7edcb
a36dac8d86

Original comment by zeldigas on 13 Oct 2009 at 6:36

GoogleCodeExporter commented 9 years ago
I'm trying to send and also want to receive MMS from my friends, but I noticed 
while
using APNdroid it disables this setting. I tried to switch it off and it did 
work,
but that's when its using my AT&T network and I don't want that because it 
costs money. 

So any solutions? Please?

Original comment by hanna....@gmail.com on 12 Apr 2010 at 3:51