I currently have been trying to implement an application that supports advanced SMS features like compression (as spelled out in specification "Compression algorithm for text messaging services (Release 8)", 3GPP TS 23.042 V8.0.0). A quick search of the forum did not result in anything that supports this, so forgive me if this is a repeat.
Does anybody have an implementation of this specification that actually works? I would very much like to see the source code if so, but an application that I could compress an SMS using that protocol would be nice as well just to compare to what I am generating.
The problem is I have the GSM 7bit huffman tree, and it works fine for me, but it does not produce results that match the test vectors included with the specification above.
Any help would be greatly appreciated!
I did find an implementation that CLAIMS to be compliant, but I have to work through de-compilation of it... JAVA Class files... Also working up a driver for it to test out it's compression. If I can successfully de-compile the class files, and the driver works, then I might be done (short of converting it to C/C++). I'll post later on the success /failure of it.
Oh, it's called "Attention" and the JAR files are available at:
http://code.google.com/p/attention/
Got the SVN source tree for it (was added recently) and this is truly not ready for prime time. It is RIDDLED with errors and absolute paths' to files that don't exist as anything other than resources... I have tried going through and fixing most of them that has to do with the compression, but my hopes are not high. Plus, it's in JAVA...
Anyhow, I am still looking for a GOOD implementation of this. Any suggestions would be greatly appreciated.
Since I'm not strong in C++, is it possible in a native/hybrid app to use a P/Invoke call to call native APIs from C# code?
So far what I have seen is COM interop where you have to code the bulk of what you want to do in native C++.
Any possibility here and if so how?
No. At least not that we know of. You have to create COM wrappers for native functions.
Various Marshaling APIs, which makes P/Invoke tick, are off-limits.
WP7 apps run under silverlight - the best place to learn about the security model and why p/invoke is not possible is here:
http://msdn.microsoft.com/en-us/library/dd470128(v=vs.95).aspx
As you can see the restriction is quite deep routed in the framework.
It still might be possible to run proper .NET CF executables in the future though if we can get it installed.
pInvoke
I just met a guy today, who successfully published WP7 app, that uses pInvoke - he just filled the Technical Exception form and ... done
It's used for muting system volume when the phone is in range of specified WiFi network (using BG agent) - for example when in range of school Wifi, turn the speaker off.
http://www.windowsphone.com/en-US/apps/6813ea1f-8d71-4ad5-a6d2-f80c193c6ac9
Can anybody confirm this actually works? He haven't tested it, because it won't work in emulator and even not in default developer unlock.
Here's the code he used, disassembled from the app:
http://pastebin.com/PfFm9Wxg
Do you know about any other apps, except apps from OEMs and Microsoft, that use pInvoke?
This gave me an idea, what else could be possible using small use of pInvoke? Maybe even something lot of users are asking for, like battery status on the start screen, who knows?
Thread Moved To WP7 Q&A
This is a development section, not Q&A. Please post in the correct section!
OK, a few things:
P/Invoke not working is *very* well documented. The DllImport attribute *appears* to be available, but calling a function that uses it invariably fails. The work-around for native code access is to use COM. There's also a project to re-implement DllImport.
Native code access has been available to homebrew developers for about a year, now. There are many apps which use it, ranging from web servers to registery browsers to yes, even an app that shows your battery status as a live tile on your Start screen...
These apps are not, however, permitted by Microsoft's Marketplace rules. It may be possible to get an exemption (some Marketplace apps do use native code) but by default, all apps that try to use native APIs (either via COM or P/Invoke) are automatically detected and rejected during analysis of the app prior to its approval.
As for the code you linked, it doesn't even compile (WP7 doesn't include CharSet.None, apparently). If you remove the CharSet directive, or if you set it to CharSet.Auto, it will compile but fails when used. You also didn't include any of the #using directives (OK, without the # in C#). Better would have been to just send us the XAP directly (yes we can get it, but a copy/pasted smidge is a lot less useful)
Downloaded the XAP. It's a paid app, so many tools won't find it.
Examining now. Nothing exotic so far. Possibly P/Invoke only works on signed apps?
The actual message signature that I see:
[PreserveSig]
[DllImport("coredll.dll", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Ansi, SetLastError = true)]
private static extern int waveOutGetVolume(IntPtr device, out uint volume);
Note that CharSet.Ansi still doesn't seem to exist. That said, this might simply be due to an outdated interop library that shipped with NoDo, and the Mango one does support this? More investigation...
"Possibly P/Invoke only works on signed apps?"
That's the question! If this actually works, it's possible we can get exception for more pInvoke calls and it might be even possible to certify app in marketplace for showing battery status or similar goodies. It won't be possible using that dllImport project, that's more than sure, but if we use only well defined set of safe pInvoke calls, we might get submission exception. It's definitely worth finding it out, what's possible here
Hi all,
I recently developed an application to do symbolic computation (some thing like Mathematica) by cross-compiling and including existing open source software.
The problem now is that, the software is too big due to big libraries required for computations and displaying equations. I was wondering which one is best way to deal with it.
a) The app downloading libraries from internet
b) Each library will be having an installation apk which will extract its content to mobile
c) Make the app real fat (around 14MB)
The problem with option c is that the updates become quite big too.
So, which one is best option? a or b
BTW, if you are wondering what app I am talking about, you can search for "MathScript" in android market.
For now it used option a.
Use option a.
Option a.
Others people might think its a virus or something if apk is like 14 MB
The software is now designed to download the libraries from internet.
Thanks for your suggestions.
Hi,
I'm a developper/system debugging on Android Gingerbread for new smartphones with Intel processors. I am currently integrating new components and middleware for Intel adaptation, especially in sound/audio domain. I am quite newbie on Android.
In the Android system, there are asset files to provide applications or service the method to get their ressources files like audio notification sound files.
My problem is that for a particular service, these asset files are not found and it takes some time to check and return that these files are not found. As a result, a latency of 10 s is observed, when asking for system volume levels.
This happens to the Mediaplayer (Mediaplayer.java) in the setDataSource method. The method openAssetFileDescriptor tries to open an uri which is "content://settings/system/ringtone". Does it mean that it looks for some package Id ringtone ? It is also the same for notification_sound and alarm_alert. And of course, these ids are not present under my platform, so a File Not Found exception is raised..
If you may have just a small clue about this, it might help.
Thanks
Vinio
So do I have to admit that no one know about asset files in the Android world except people from Google ?
Multiple errors on build: X module depends on Y library
Anyone have a good hack for dealing with broken library dependencies? Sure, you can go one by one to line them out, but seems like it'd be easier to put and ignore statement somewhere so you're not prompted each time a broken library is found on build.
Separate, but related, why would folks put source out there with so many of these issues? Is it just considered part of the build process that you have to deal with this sort of thing?