Related
I know and testes PhoneNetworkingSample and it works, but only in TCP.
If there's a UDP support?
Support? Yes in a way. Jeremiah's sample is a thin layer around the very low level winsock and just because the datagram type isn't supported in Silverlight doesn't mean it won't be here.
I haven't tested this because there is a lot more work but if you look at line 42 of NetSockets.cpp in the Network native library project and change SOCK_STREAM to SOCK_DGRAM you'll have a good starting point. UDP is a connection-less socket but it seems to function in a very similar way to the point that the SendBytes and ReadBytes functions should just work for UDP. You'd just want to build a managed wrapper in the NetworkApi section to match what you're doing in the native code.
I'm personally not too clear on how to get the network c++ library to compile correctly but building the managed wrapper around it should be cake. Hope that helps.
Thanks for your response, only one more question:
Where can I download the "Network native library" source code to take a look. I Binged and Googled (in this order), and don't found it.
Thanks for your time!
duefectu said:
I know and testes PhoneNetworkingSample and it works, but only in TCP.
If there's a UDP support?
Click to expand...
Click to collapse
It is worth noting that the decidedly best way to access sockets is to use reflection to access the classes/methods for the System.Net namespace in the GAC.
duefectu said:
Thanks for your response, only one more question:
Where can I download the "Network native library" source code to take a look. I Binged and Googled (in this order), and don't found it.
Thanks for your time!
Click to expand...
Click to collapse
I fount it in the VS2008 folder
WP7 supports sockets?
Since when does WP7 supports sockets at all? Did I miss something?
zbend said:
Since when does WP7 supports sockets at all? Did I miss something?
Click to expand...
Click to collapse
You miss this -> http://forum.xda-developers.com/showthread.php?t=861501
Not for MarketPlace, but take a look to the new WP7 update, Microsoft plans to open the Homebrew access -> http://www.chevronwp7.com/
Hi there!
I kept the thread about java apps in menu:
Code:
h ttp://forum.xda-developers.com/showthread.php?t=[HTML]912270&page=6
Now, I want to implement those icons to MainMenu and Desktop of Bada 2.0
I have seen callings in other branded firms to Java Apps in the Menu. There were modifications in HsMenuItemURL.ini and MainMenu_Init.ini. The calling to the Java app or ID was set in 210.
I tried the same with OperaMini, which is set in ID=80. The Java app shows but it does not open, nothing happens. I think I'm missing something. Maybe, some file to place the ID and relate it to the .jar. Don't know yet.
Any help? Any solutions?
[EDIT] Success in running some Java apps from the Main Manu: Opera Mini and Google Maps. Only some IDs known. Any list of rest of IDs?
Best Regards!
Do you explain it for bada 2.0 and add more java apps main menu. Thanks
chetto106 said:
[EDIT] Success in running some Java apps from the Main Manu: Opera Mini and Google Maps. Only some IDs known. Any list of rest of IDs?
Best Regards!
Click to expand...
Click to collapse
Explain please and share your work for others
Was Opera Mini package i gave to you useful ? How you used it if yes ?
Best Regards
Already made on Hfr
http://forum.hardware.fr/hfr/gsmgpspda/smartphone/unique-samsung-officiel-sujet_21066_1.htm
http://i47.servimg.com/u/f47/15/37/97/52/20111212.jpg
Hi, there is some ID's if you need:
109 - Dolphin messaging
110 - orange games
164 - search
in this interval 97 -112 - orange maps and app shop
in this interval 33-48 - my music, orkut
I know about the IDs already
But this is not the spirit of sharing/open sourcing the work done....This is like "Download this Custom to Know"
I am too lazy to download and look into it right now but when i do this i'll explain what to do to get this as advertised ....Maybe i'll say how to get unlisted apps too
Best Regards
There is 4 files to modify:
-MainMenu_Init (in CSC\SystemFS\Settings\PreConfiguration\Default\Registry)
for exemple:
// Navigate
MenuID4=163
MenuType4=3
Click to expand...
Click to collapse
- HsMenuItemURL (in CSC\SystemFS\Settings\PreConfiguration\Default\Registry)
for exemple:
#Version
Version=1
#URL
MenuID25=http://m.youtube.com/?client=mv-samsung-bada
//Java midlet
MenuID65=Palringo
MenuID80=OperaMini
MenuID108=Deezer
MenuID163=NaviGate
Click to expand...
Click to collapse
- KJxMidlet (in CSC\AppEx\SysDefault\Java\_ini)
for exemple:
#NaviGate
class=com.google.googlenav.GoogleNav
vendor=Google
name=NaviGate
Click to expand...
Click to collapse
- KJxDispatch.ini (in CSC\AppEx\SysDefault\Java\_ini)
for exemple:
#OperaMini
class=Browser
vendor=Opera Software ASA
name=Opera Mini 4
#Palringo
class=com.paxmodept.palringo.main.jme.JmeMain
vendor=Palringo
name=Palringo
#Deezer
class=deezer.j2me.DZMidlet
vendor=BlogMusik
name=Deezer
#NaviGate
class=com.google.googlenav.GoogleNav
vendor=Google
name=NaviGate
Click to expand...
Click to collapse
And place your java application in AppEx\SysDefault\Java\Games
This does not work with all java applications, only with predefined ones.
Lasetenza,
For main Menu we have standart list of predefined application, but
we can change java application, now i can start Jimm by shortcut Palringo.
for it we need to correct class, vendor and name in KJxDispatch.ini and KJxMidlet.ini
And seems that all string from menu located in System.rsr, and i think we can correct name of java application. But i don't know how to correct icons((((
mylove90 said:
I know about the IDs already
But this is not the spirit of sharing/open sourcing the work done....This is like "Download this Custom to Know"
I am too lazy to download and look into it right now but when i do this i'll explain what to do to get this as advertised ....Maybe i'll say how to get unlisted apps too
Best Regards
Click to expand...
Click to collapse
Sorry if it is already shared, but I tested them one by one and found this numbers.
Hi every one
how can i use stune with bada 2
it worked for me on 1.2 but now it does nothing
maybe another way or app to view internal files?
Joseph013 said:
Sorry if it is already shared, but I tested them one by one and found this numbers.
Click to expand...
Click to collapse
NVM
more research to come later
I am just trying to fell free after my exams and don't want to hurt my head by modding a firmware today....Maybe tomorrow
Best Regards
Edit for the guy asking about sTune
Download 1.06 from here : http://dl.dropbox.com/u/12819503/STune.exe
1.06 works fine on 8500 and 8600.
regards
Sorry I didn't answer before! I'm on my exams time
It is exactly how lasentenza explained, modifying those 4 files. No more interesting IDs found nor found the way to implement other apps with a custom ID. However, I am still researching, I'm a stubborn
Hello all!
I am looking into development of something which is similar to people's list in people hub. What I want is a huge list of people on one page with (of course) LonglistSelector. When I tap a member of the list, I want the user to be navigated to the details page of that item. User needs to be able to manipulate and modify the data on the details page. The list is going to be real huge. I have a few question about the approach.
1. What is the best way to store data? I am thinking of creating local database with a few columns with person's name in one column, age in another etc.
If this is the approach to go for, can anyone provide me detailed description about the databases? I have deeply gone through the MSDN, WindowsPhoneGeek and many other documentations. I feel dumb about the whole database scenario.
2. Is XML list as database a good approach for large amounts of data or it will be pain?
i would say SQL CE is your best bet to store huge amounts of data. XML is slow at large volumes of data when compared to JSON. I would prefer JSON over XML.
darthveda said:
i would say SQL CE is your best bet to store huge amounts of data. XML is slow at large volumes of data when compared to JSON. I would prefer JSON over XML.
Click to expand...
Click to collapse
So basically, I need to go with the local database using LINQ. Now, how do I do that? As I mentioned, I have read intensively. However, I just don't seem to get hang of it.
akshay2000 said:
So basically, I need to go with the local database using LINQ. Now, how do I do that? As I mentioned, I have read intensively. However, I just don't seem to get hang of it.
Click to expand...
Click to collapse
I created my local database with LINQ based off this sample:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286405(v=vs.92).aspx
First define the columns which you would want to create and then modify the sample code to suit your needs.
For contacts, there is an excellent sample available:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286416(v=vs.92)
if you are stuck with some particular piece of code then let me know, i would be glad to help you out
darthveda said:
I created my local database with LINQ based off this sample:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286405(v=vs.92).aspx
First define the columns which you would want to create and then modify the sample code to suit your needs.
For contacts, there is an excellent sample available:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286416(v=vs.92)
if you are stuck with some particular piece of code then let me know, i would be glad to help you out
Click to expand...
Click to collapse
I had gone through those links earlier! Back then, they made very little sense to me. I have researched a bit by now. I will update here if I get stuck somewhere.
hi
i had read the thread now and maybe this example of MS can help you... it's not based on local database, but uses ASP.NET Web API!
so maybe this is a way for you..
darthveda said:
if you are stuck with some particular piece of code then let me know, i would be glad to help you out
Click to expand...
Click to collapse
I'm attaching my code file to the post. When I try to run the app and click the button (it tries to add an item to the observablecollection) I get NullReferenceException error. Apparently, the collection's instant hasn't been created. But I tried to instantiate it using 'new' keyword - no luck. Am I doing anything wrong?
akshay2000 said:
I'm attaching my code file to the post. When I try to run the app and click the button (it tries to add an item to the observablecollection) I get NullReferenceException error. Apparently, the collection's instant hasn't been created. But I tried to instantiate it using 'new' keyword - no luck. Am I doing anything wrong?
Click to expand...
Click to collapse
solution folder will be better, you are using telerik controls, i can't recreate your solution.
It's done!
darthveda said:
solution folder will be better, you are using telerik controls, i can't recreate your solution.
Click to expand...
Click to collapse
Thanks for the response! After a lot of debugging and (almost literally) adding Debug.writeline after each line of code, I managed to solve it. It had nothing to do with the Database or the ObservableCollection. It was totally different - GroupDescriptor issue! More details here: http://stackoverflow.com/questions/...ion-while-adding-item-to-observablecollection
I'll post here if I get stuck with something again.
Again, thanks a lot!
Any reason you are using telerik controls? for starters and very simple programs, you can use controls from silverlight toolkit or coding4fun toolkit. i am using longlist selector which does the job just like the jumplist from telerik controls does.
darthveda said:
Any reason you are using telerik controls? for starters and very simple programs, you can use controls from silverlight toolkit or coding4fun toolkit. i am using longlist selector which does the job just like the jumplist from telerik controls does.
Click to expand...
Click to collapse
No specific reasons except that the Jumplist provides StickyHeader functionality. And animation framework seems nice addition too!
Hi there, I have strange problem with my Xposed code.
I use a static HashMap to store unlock timestamps for Applock application, first I add the entry with put, and 200ms later I call get at another location. The thing is: the HashMap isn't updated yet. A few hundred milliseconds later, it is, but not before. And that's strange, as HashMaps should be VERY fast, I read somewhere about 50ms for a HashMap with 10 000 or even more entries, and mine has 300 maximum while in use, while testing it maybe had 15..
Is there a way to force an update of that HashMap?
Kind regards,
Max
@rovo89, @romracer, @C3C076
There is no delay, once the put call returns, you can get the item again. If you're calling from a different thread, make sure to synchronize properly. The relevant excerpts of your code would be necessary to say more.
rovo89 said:
There is no delay, once the put call returns, you can get the item again. If you're calling from a different thread, make sure to synchronize properly. The relevant excerpts of your code would be necessary to say more.
Click to expand...
Click to collapse
Of course, sorry, forgot to add link: https://github.com/Maxr1998/MaxLock...ain/java/de/Maxr1998/xposed/maxlock/Main.java
Should I create my own implementation of HashMap and make put and get snychronized?
Maxr1998 said:
Of course, sorry, forgot to add link: https://github.com/Maxr1998/MaxLock...ain/java/de/Maxr1998/xposed/maxlock/Main.java
Should I create my own implementation of HashMap and make put and get snychronized?
Click to expand...
Click to collapse
No reason for own implementation. Surround hashmap operations with synchronized block.
E.g.
synchronized (TEMPS) {
TEMPS.put(...);
}
C3C076 said:
No reason for own implementation. Surround hashmap operations with synchronized block.
E.g.
synchronized (TEMPS) {
TEMPS.put(...);
}
Click to expand...
Click to collapse
Tried it, but it didn't work. I already pushed the changes, could you take a look if I did something wrong?
Sent using my nexus⁴ running Euphoria 1.1 with Xposed and hells-Core B80
@rovo89 @C3C076 I also tried a ConcurrentHashMap without synchronizing like described here/Concurrent Collections, doesn't work as well.
When I get and log the value again 2 seconds later via Handler.postDelayed, it was updated..
Sent using my nexus⁴ running Euphoria 1.1 with Xposed and hells-Core B80
One possible reason is you are putting items to map within one process (belonging to your MY_PACKAGE_NAME) and
attempting to read map from different process (e.g. "android.app.Activity"). I believe you cannot see items put to map from one process to be "visible" by different process. Each process has its own instance of TEMPS map with own items in it. The contents of map is not shared across processes.
You have to think about using different approach.
Instead of memory store, use file system or DB which all processes you are hooking would have access to.
C3C076 said:
One possible reason is you are putting items to map within one process (belonging to your MY_PACKAGE_NAME) and
attempting to read map from different process (e.g. "android.app.Activity"). I believe you cannot see items put to map from one process to be "visible" by different process. Each process has its own instance of TEMPS map with own items in it. The contents of map is not shared across processes.
You have to think about using different approach.
Instead of memory store, use file system or DB which all processes you are hooking would have access to.
Click to expand...
Click to collapse
It actually is shared. I used a few handler().postDelayed() to read the value in periodic time segments and the value is updated maybe 500ms after first check were it isn't.
Sent using my nexus⁴ running Euphoria 1.1 with Xposed and hells-Core B80
Hit thanks if I helped!
Maxr1998 said:
…but I still get lockscreen looping because my Map isn't updated fast enough.
I already tried synchronizing the critical blocks on Map itself, on Main class, used ConcurrentHashMap, Collections.synchronizedMap(), created baclground Threads for put(), used delays to wait for update, etc. bla bla. I just can't get it to work.
It always updates the Map a few hundred milliseconds after polling, when I use delay, it still does.
If there's anyone who can help me on that issue, it would be highly appreciated.
Click to expand...
Click to collapse
@rovo89 @C3C076
Sent using my nexus⁴ running Euphoria 1.1 with Xposed and hells-Core B80
Hit thanks if I helped!
Again, a map is updated immediately. You can verify this by getting the value immediately after putting it into the map, from the same place. For accessing the values from other threads, you use synchronization, but with the methods you tried, this doesn't seem to be the problem. So it's probably something else in your code, like trying to access the variable from a different process. You could log pid and tid for debugging whenever you access the map.
rovo89 said:
Again, a map is updated immediately. You can verify this by getting the value immediately after putting it into the map, from the same place. For accessing the values from other threads, you use synchronization, but with the methods you tried, this doesn't seem to be the problem. So it's probably something else in your code, like trying to access the variable from a different process. You could log pid and tid for debugging whenever you access the map.
Click to expand...
Click to collapse
Ok, thanks. I now found out the Map updating happened at the onPause logic in the same process, my LockActivity uses another Map, like you said.
Could you point me to an easy and fast database solution? Maybe something like XSharedPreferences at public storage with write support? Could you maybe even create such thing for XposedBridge?
C3C076 said:
One possible reason is you are putting items to map within one process (belonging to your MY_PACKAGE_NAME) and
attempting to read map from different process (e.g. "android.app.Activity"). I believe you cannot see items put to map from one process to be "visible" by different process. Each process has its own instance of TEMPS map with own items in it. The contents of map is not shared across processes.
You have to think about using different approach.
Instead of memory store, use file system or DB which all processes you are hooking would have access to.
Click to expand...
Click to collapse
I'm trying to make a module that replaces methods, modify variables that are passed as parameters, and call methods relatively to the hooked class (this.privateMethod()). But the offial wiki doesn't show how to either replace methods or use parameters.
Now some questions that I have are:
How can I create/modify instances of Objects that exists only in the hooked app? For example if a CustomClass object is passed as a parameter of a method I have hooked, how can I modify variables and call methods in the variable? And how can I create a new instance?
What should I return in a method I hooked with XC_MethodReplacement? It is registered as an Object so I should return something, but the method I'm hooking is a void.
How can I call private methods of a class I have an instance hooked of? Normally I'd call them with this.method(), but I don't think I have access to this "this" variable. Do I?
That's all I can think of from the top of my head, but more are bound to come up along the way. So if you have a reliable source of information like a guide, tutorial or blog post, please tell me!
Baconator724 said:
I'm trying to make a module that replaces methods, modify variables that are passed as parameters, and call methods relatively to the hooked class (this.privateMethod()). But the offial wiki doesn't show how to either replace methods or use parameters.
Now some questions that I have are:
Click to expand...
Click to collapse
http://api.xposed.info/
How can I create/modify instances of Objects that exists only in the hooked app? For example if a CustomClass object is passed as a parameter of a method I have hooked, how can I modify variables and call methods in the variable? And how can I create a new instance?
Click to expand...
Click to collapse
Simply use methods from XposedHelpers class. E.g. you can modify any field of CustomClass instance using appropriate setIntField, setObjectField, ... (depedning on type of variable you need to modify). For calling methods use XposedHelpers.callMethod() or callStaticMethod() in case of static methods.
To create new instance, get one of the defined constructors and call newInstance() (check with Java reflection docs).
What should I return in a method I hooked with XC_MethodReplacement? It is registered as an Object so I should return something, but the method I'm hooking is a void.
Click to expand...
Click to collapse
Simply return null
How can I call private methods of a class I have an instance hooked of? Normally I'd call them with this.method(), but I don't think I have access to this "this" variable. Do I?
Click to expand...
Click to collapse
XposedHelpers.callMethod(object, "methodName", params...)
where object is instance of class method belongs to. If you are within a hook, simply use params.thisObject as object.
Thanks! But could you explain this a bit more detailed?
C3C076 said:
To create new instance, get one of the defined constructors and call newInstance() (check with Java reflection docs).
Click to expand...
Click to collapse
Do I need to import the target APK in my project for this to work?
Baconator724 said:
Thanks! But could you explain this a bit more detailed?
Do I need to import the target APK in my project for this to work?
Click to expand...
Click to collapse
No. Use XposedHelpers.findConstructorExact() to get one of the constructors of class you want to instantiate and call newInstance() on that constructor supplying constructor parameters (if any).
Example : https://github.com/GravityBox/Gravi...low/gravitybox/quicksettings/QsTile.java#L123