Issue in openintents simulator, after running directly going to "Connection settings" page instead of my desired page

by Nithin » Wed, 04 Mar 2009 15:27:27 GMT


Sponsored Links
 hi,

I am trying to use open intents simulator and do all the settings
according to the instructions. But when i tried to run a sample
program, after running, its directly going to the "connections
settings page" in openintents.apk.

please guide me in this issue, heres my code...

import org.openintents.hardware.SensorManagerSimulator;
import org.openintents.provider.Hardware;

import android.app.Activity;
import android.content.Intent;
import android.hardware.SensorListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.widget.Toast;

public class OpenPage extends Activity implements SensorListener {

        SensorManager sensorManager;
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.openpage);

                /* start open intents code */

                Hardware.mContentResolver = getContentResolver();
                sensorManager = (SensorManager)getSystemService
(SENSOR_SERVICE);
                Intent intent = new Intent(Intent.ACTION_VIEW,
Hardware.Preferences.CONTENT_URI);
                startActivity(intent);
                sensorManager.unregisterListener(this);
                SensorManagerSimulator.connectSimulator();

                /*end open intents code */

                sensorManager.registerListener(this,
SensorManager.SENSOR_ACCELEROMETER |
                           SensorManager.SENSOR_MAGNETIC_FIELD |
                           SensorManager.SENSOR_ORIENTATION,
                           SensorManager.SENSOR_DELAY_FASTEST);
        }

        @Override
    protected void onResume() {
        super.onResume();
        sensorManager.registerListener(this,
                SensorManager.SENSOR_ACCELEROMETER |
                SensorManager.SENSOR_MAGNETIC_FIELD |
                SensorManager.SENSOR_ORIENTATION,
                SensorManager.SENSOR_DELAY_FASTEST);
    }

    @Override
    protected void onStop() {
        sensorManager.unregisterListener(this);
        super.onStop();
    }

        public void onAccuracyChanged(int sensor, int accuracy) {
        }

        public void onSensorChanged(int sensor, float[] values) {
                Toast.makeText(this, Float.toString(values[0]) +"::"+
Float.toString
(values[1]) +"::"+ Float.toString(values[2]), Toast.LENGTH_SHORT).show
();
        }

}

Thanks
Nithin
--~--~---------~--~----~------------~-------~--~----~



Issue in openintents simulator, after running directly going to "Connection settings" page instead of my desired page

by (Mishail) » Wed, 04 Mar 2009 23:50:13 GMT


 It's OK since your activity starts OpenIntents by startActivity
(intent);

Your activity should resume after exiting from openintents. But please
make sure that you granted "android.permission.INTERNET"  for your
application, see  http://code.google.com/p/openintents/wiki/SensorSimulator ,
comments section, "Comment by patrickneese,  Feb 03, 2009":
There shall be <uses-permission
android:name="android.permission.INTERNET"/> for your activity




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Issue in openintents simulator, after running directly going to "Connection settings" page instead of my desired page

by nithin » Thu, 05 Mar 2009 12:15:53 GMT


 Thanks Mishail,

i hope that will help.. going to try..

Nithin




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. bedah kasus perfect spl di magic dengan ruu asia (indo)

halo androiders.. mo buka thread nih tentang perfect spl di magic dengan ruu
resmi asia khususnya indo.
SAPPHIRE PVT 32A SHIP S-ON H
HBOOT-1.76.0007 (SAPP10000)
CPLD-12
RADIO-6.35.07.29
Aug 4 2009, 19:43:30

di rom ini TIDAK terdapat market. paling gak biar bisa ada market harus
ganti dengan ruu sing dengan menggunakan metode
goldcard<http://theunlockr.com/2009/08/14/how-to-root-your-mytouch-3g/>(seperti
kata salah satu rekan di millis ini) lalu di lanjutkan dengan one
click install ruu seperti biasa.

pertanyaannya adalah
- adakah kemungkinan bricked?
- sudah adakah yang melakukannya?
- saran dan masukan lainnya

-- 
Regards.. Adri..

-- 
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

2. Applikasi menyenangkan setelah nge-root dan bikin bisa tidur

Hello!

entah ini bisa berguna atau tidak, tapi sepertinya untuk anda2
sekalian yang punya penyakit insomnia, mungkin bisa mencoba sebuah
aplikasi yang menghadirkan suara2 yang jarang didengar setiap hari
atau bahkan karena lokasi yang jauh ketika mencoba untuk tidur.

applikasi yang bernama Lightning Bug ini berfungsi dengan mengeluarkan
suara seperti suara hujan, downtown new york maupun suara ombak
dipantaidi pantai, jadi kalau cape setelah rooting dan ingin tidur
lebih nyaman, silahkan mencoba aplikasi ini.

mudah2an berguna.

My fav so far is the beach at night sound.
so comforting.

sekali lagi Android membuktikan sama gua kalau dia bisa memberikan
sebuah hal yang beda dari OS yang lain.

here's the link :

http://androidanarchy.com/index.php?option=com_content&view=article&id=75:lightning-bug&catid=2:free-apps&Itemid=10

have fun!
-- 
Narendra Kameshwara

YM : kosto...@yahoo.com
http://blogroll.dailywhatnot.com/nareen/

-- 
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

3. OOT tentang mejik ku

4. Android and VOIP

5. ERROR: Application requires API version 6. Device API version is 5 (Android 2.0)

6. Problem in accessing ConnectionManager.getAllNetworkInfo()

7. Solved WTA: Start up screen blink