Active Topics

 


Reply
Thread Tools
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#1
Hi, I'm using the scratchbox to test my PyQt4 app before moving it to the n900.

I couldn't find a way to use some of the n900 built-in functionalities inside the scratchbox, for example:

- Simulate a phone call
- Simulate accelerometers changes, like rotate or shake the device
- Install packages from extras/extras-devel
- Press the power key

Can these things be done in the scratchbox?
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#2
Originally Posted by omeriko9 View Post
Hi, I'm using the scratchbox to test my PyQt4 app before moving it to the n900.

I couldn't find a way to use some of the n900 built-in functionalities inside the scratchbox, for example:

- Simulate a phone call
- Simulate accelerometers changes, like rotate or shake the device
You can't actually simulate those events, to my knowledge, as SINE (Scratchbox Is Not an Emulator (TM)), however, you may be able to use D-Bus in some cases to simulate some of the effects of various events. I'm not actually sure, but you might want to look into it.

Originally Posted by omeriko9 View Post
- Install packages from extras/extras-devel
You have to add some lines to /etc/apt/sources.list in sbox. Look in /etc/apt/sources.list.d/hildon-application-manager.list on-device for examples. Note that lines beginning with "deb" are binary repos, and those beginning with "deb-src" are the corresponding source repos (where they exist - accessible using apt-get source) - otherwise, the syntax is identical.
 

The Following User Says Thank You to For This Useful Post:
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#3
Originally Posted by jaem View Post
You can't actually simulate those events, to my knowledge, as SINE (Scratchbox Is Not an Emulator (TM)), however, you may be able to use D-Bus in some cases to simulate some of the effects of various events. I'm not actually sure, but you might want to look into it.


You have to add some lines to /etc/apt/sources.list in sbox. Look in /etc/apt/sources.list.d/hildon-application-manager.list on-device for examples. Note that lines beginning with "deb" are binary repos, and those beginning with "deb-src" are the corresponding source repos (where they exist - accessible using apt-get source) - otherwise, the syntax is identical.
Thanks.

Can you refer me to where can I find D-Bus uses?
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#4
Ha... Haha... you're funny.
um... at the moment? Some of it's documented on the development wiki, but you'll probably have to poke through some header files at the source code x-ref @ mxr.maemo.org for some of it. I haven't checked the dev wiki recently, but last I saw, it was lacking in depth mostly, and breadth to some extent as well. If you have specific D-Bus calls that you're looking for, and can't find them, I or someone else may be able to tell you off the top of our heads.
 
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#5
Originally Posted by jaem View Post
Ha... Haha... you're funny.
um... at the moment? Some of it's documented on the development wiki, but you'll probably have to poke through some header files at the source code x-ref @ mxr.maemo.org for some of it. I haven't checked the dev wiki recently, but last I saw, it was lacking in depth mostly, and breadth to some extent as well. If you have specific D-Bus calls that you're looking for, and can't find them, I or someone else may be able to tell you off the top of our heads.
Well thank you I do my best to entertain

Actually I have no idea of any D-Bus usage, I'm new to linux and all I know is that D-Bus is a message bus system for inter process communication, and it must operate on an instance. I guess is should be similar to RPC?...

Any chance to a code example in Python? (Hope I'm not being funny again)
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#6
Originally Posted by omeriko9 View Post
- Install packages from extras/extras-devel
Just today I wrote instructions how to do that in another thread.

Daniel
 

The Following 2 Users Say Thank You to danielwilms For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#7
Originally Posted by omeriko9 View Post
Well thank you I do my best to entertain

Actually I have no idea of any D-Bus usage, I'm new to linux and all I know is that D-Bus is a message bus system for inter process communication, and it must operate on an instance. I guess is should be similar to RPC?...

Any chance to a code example in Python? (Hope I'm not being funny again)
You'll probably want to read sections 1 & 4 on the D-Bus site before working with it. There are python bindings, but I've never personally used them. I think there may be some example code linked to from that site, but I'm not sure. To put it briefly, D-Bus is typically used with a "bus", or hub, that all messages go through (you can route them directly, but it's discouraged), and which services can be registered on. You can send messages to another app that is on the bus, or you can send out signals, which other apps can opt to receive.
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#8
Originally Posted by omeriko9 View Post
Any chance to a code example in Python? (Hope I'm not being funny again)
http://wiki.maemo.org/PyMaemo#Softwa..._using_PyMaemo

http://wiki.maemo.org/PyMaemo/Phone_...d_SMS_examples

http://www.paraiso.dk/pymaemosms.txt

That first link is about as good as it gets I think. The other two were just examples off the first one.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 10:45.