Sunday, March 31, 2013

Creating a re-usable API for creation / maintenance of Joomla accounts for use in Android App / Mobile Site development


I am using Joomla 1.5 and I am already aware of some of the difficulties associated with creating Joomla accounts from third party domains and scripts and authenticating with Joomla (logging in) from a third party domain / script.


My understanding is that the difficulty lies in the usage of a secret key to salt the MD5 hashed password for added security, and that this key resides in the configuration.php file.


That once Joomla 1.5 is installed, in configuration.php we already have a secret key in the form of:



var $secret = 'xxxxxxxxxxxxxxxxxxx';


Now assuming that we have access to the jos_users and jos_sessions table, is it not possible to create a simple PHP script (that given the Username, Password, MD5 hashed and salted using the secret key) that we could use to bypass Joomla completely and handle signup, login, logout and session data directly via the MySQL database without the need to touch the Joomla installation at all?


I would like to do this by creating an /api folder as a project and build on this platform.


I have much to learn I know, but I am hoping, logically, a reusable piece of code can be constructed.


If not,I understand that perhaps a simple plugin maybe needed to help facilitate these features using XML-RPC from within the Joomla Framework, however I would prefer to avoid this route.



.

forums.androidcentral.com

Air Android GCM ANE MismatchSenderId when switching between air extensions


I'm trying to get Android GCM Push notifications to work in an AIR for Android project using Flash Builder.


I started off using Freshplanet's GCM ANE - https://github.com/freshplanet/ANE-Push-Notification.


I set it up with ease, and I receive notifications with no errors. But I couldn't seem to get the icons, sounds, vibration to work. So then I started looking for another ANE and discovered - http://myappsnippet.com/gcm/


I removed all of the Freshplanet code, setup everything the same exact way. Got a new registration ID and test it out using this php test script http://myflashlab.com/showcase/AIR_EXTENSIONS/GCM/


But I just get MismatchSenderId.


I've tried un-registering, completely uninstalling the app, then re-installing the app, then getting a new registration ID...and yet I still get MismatchSenderId.


I've even deleted my google project and got an entirely new GCM project ID and Server API key. I even tried with the Browser API key just for the heck of it. I have "Any IP allowed" and "Any referer allowed".


So after trying that a million times, I decided to uninstall and go back to the Freshplanet ANE and it works and sends just fine. No error. Maybe someone can think of something that's not getting properly cleared and how I might clear it? I don't understand why it would even matter to be honest.


I can't think of anything beyond un-installing the app and making a new Google API project...which didn't work at all. Maybe someone has experience with http://myappsnippet.com/gcm/ could share some insight? The dev just keeps saying it's on our end in the comments and assumes we dont have the right projectID or API key or we dont have Any IP allowed.



.

forums.androidcentral.com

How to get variables from separate fragments using the same class

android - How to get variables from separate fragments using the same class - Stack Overflow




















In my Android app, I have an activity with 4 fragments. All the fragments have the same exact fields, so they are all inflated from the same xml file and have the same java class. However, I need to get the data stored in each of them because the user will be entering things in each one. So how would I be able to get the data if they all have the same class?



















Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.










default







.

forums.androidcentral.com

instantiation of FragmentTransaction object not possble according to the compiler, Android


when I try to instantiate FragmentTransaction() I the the error message:


"can not instantiate the type FragmentTransaction"


in google Android reference it states:


Public Constructors


FragmentTransaction()


so if there is a constructor of FragmentTransaction() then it must be possible to do this,



FragmentTransaction fragtransaction = new FragmentTransaction();


the question is WHY is this not possible?



.

forums.androidcentral.com

android,a Receiver intent is null


this is my receiver.viewChanger is my original class .



public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
viewChanger vc = new viewChanger();

if(action.equals("android.intent.action.TIME_TICK")){
vc.setDateView(context);

}else if(action.equals("android.intent.action.BATTERY_CHANGED")){
int level = intent.getIntExtra("level", 0);
vc.setBatteryView(level, context);

}else if(action.equals(Intent.ACTION_POWER_CONNECTED)){
int charging = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
vc.setAcusbView(charging, context);

}else if(action.equals(Intent.ACTION_POWER_DISCONNECTED)){
vc.setAcusbNullView(context);
}

}


my trouble is



int charging = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);


this intent seems to be empty,charging get to be "-1" what is wrong for me?



.

forums.androidcentral.com

android need scrollview inside a tablelayout to span over multiple columns


CHALLENGE!! ok so what i need is a row of components at the top, right below it is a scrollview with multiple rows, each row added dynamically with components that align with the components outside the scrollview. and right below the scrollview is another row of components that also align with the things above, or to say they're all in the same columns. Here's what i've tried so far: if i put the whole thing all in one tablelayout, the scrollview only takes up one column, so nothing outside of the scrollview aligns with whats inside it, and messing with the layout_width it will push the other columns outside the screen view which is no good, or just nothing aligns. i've tried putting a tablelayout inside the scrollview, but the columns of that tablelayout don't align with the columns of the tablelayout outside the scrollview. putting a linearLayout inside the scrollview doesn't help any of this either. my best hope is to put everything inside one tableLayout which is within the scrollView, and then set the top row and the bottom row so they don't scroll, is that possible? I can't find anything on how to do that. any other suggestions are appreciated. the reason for all this is because i need everything to align when the app is used on different sized screens and tablets, so i can't just position the components using dp and whatever. plz help!!



.

forums.androidcentral.com

[Q] SGS2: Internal sdcard is not mounted after upgrade to 4.1.2



Unhappy[Q] SGS2: Internal sdcard is not mounted after upgrade to 4.1.2




Hi,

Background story. It's long, and I am supposed to be brief, but maybe the stages I have been through trying to solve this matter (due to mishaps in upgrade process perhaps?) - so I'm giving it in full. Sorry in advance. I will note that I have done tens of Google searches on this problem, and the common denominator between all my findings were bugs in Custom ROMs such as CyanogenMod etc - where they have fixed it later. But I did not use any custom ROM, only original Samsung ROMs (at least as advertised). My device in Odin mode still claims to have an original Samsung FW, so I am guessing that assertion is correct?

So here goes.

I have been using 4.0.3 for quite some time. Then Samsung released an OTA upgrade, which failed to me during the reboot phase. I had a hunch (really a hunch, no proof), that this is somehow related to the fact that my device is encrypted, a feature that I have enabled after it was first supported, when I upgraded from 2.3 to 4.0.3 (OTA...).

Long story short, I tried to decrypt the device using the same menu I used to encrypt it. You would think that this would work, right? Well, it didn't. Just like the install, it got stuck at the very beginning, rebooted again, and the system was back as before (no data lost).

Last night, I felt lucky (oh, I was wrong), and tried the Decrypt again, probably the 10th time I'm doing it. This time it got stuck differently, eventually rebooting and giving me the 'swipe to unlock' screen (instead of 'enter decryption key'...). I though 'cool, it unencrypted the device...'. Wrong. After the swipe, got a blank screen. After some time, when I realized the thing is simply stuck, I rebooted through the power button.

Then I got Samsung's S changing colors... forever. Waited hours to no avail.

So I said, OK, let's try to just upgrade to 4.1.2, as this is what I wanted to do in the first place... at first I downloaded the "latest firmware" as advised by sammobile.com/firmwares/#firmware - which was from "Taiwan" and flashed it in download mode with Odin 3.0.7, by clicking on "PDA", selecting the MD5 file, seeing the verification was a success, and clicking "Start". . That seemed to work, and passed the "stuck S" stage, however I got a request for some password... in Chinese... couldn't really understand what it means, so:

I downloaded the I9100XWLSJ, which I understood is the latest for a European country (so I assumed it will be in English), which also succeeded the same way, and now I could understand the question - it was asking for my decryption password. I did actually guess this what the Chinese said, but alas, my decryption password did NOT work. And so it didn't on the English version as well.

I gave up my data. Went into bootloader, and wipe/factory default. Restart. Welcome to Android 4.1.2.

All seems to work well (OK, couldn't test the camera...), except for... the SD Card! It simply refuses to mount it as "USB Storage", as has always been. I tinkered with it for many hours (and even rooted my device for the first time...), and this is what I can say:

* The SD card is seen by the system, as external. Even though the SGS2 does not have an external SD port (unless I'm blind?). With a file browser, I can browse to it, play files from it, etc.

* Android seems to insist on using the internal card for everything. Opening the gallery. Opening the Camera. etc. Thus all those features currently do not work for me. I am merely guessing here that this is the reason, because apps say things like "Turn off USB storage before using camera" - as if the mountpoint is busy. And also - like I said - previously it was "USB Storage", for the best of my memory...

* The SD card seems to be mounted on /mnt/extSdCard or /storage/extSdCard

* The mount point /storage/sdcard0 seems to exist, and is symlinked from /mnt/sdcard, FWIW

* The SD Card is 8GB, from an old Nokia N85 phone

* Formatting the SD Card from the SGS2 didn't have any noticeable effect.

* A different SD Card [32GB] from an SGS3 running 4.1.2 shows the same symptoms

* I checked out /system/etc/vold.fstab, and in there I can see that:


Code:



# internal sdcard
{
ums_sys_path = /sys/class/android_usb/f_mass_storage/lun0/file
secure_format = enable
discard = enable
supported_exfat = disable
}
dev_mount sdcard /storage/sdcard0 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 encryptable_nonremovable

# external sdcard
{
ums_sys_path = /sys/class/android_usb/f_mass_storage/lun1/file
android_secure_containers = enable
}
dev_mount sdcard1 /storage/extSdCard auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1

Questions:

* Is my assumption correct, that this should be mounted as /storage/sdcard0? If not, and extSdCard is correct behavior, any suggestion why any app that needs the SD card says it does not exist, even though it's accessible to file explorers?

* If it is correct, any idea WHY this is happening, or, a workaround?

Much obliged!

-- Shimi


.

forums.androidcentral.com

[Q] Question about a possible vulnerability




Question[Q] Question about a possible vulnerability




Hi

I make a POC to check a point.

I set a file on the internal sdcard and I write an Android application to read it WITHOUT any permission.

So, I saw it is possible to read any file on the sdcard without to ask a permission. And then it is possible to do that in hiding to the user.

For me it is a vulnerability to have the possiblity to scan the sdcard and to read any file without permission.

What do you think about that ?



.

forums.androidcentral.com

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...