Confused.. what consitutes an activity ?

PaulF

New Member
Licensed User
Longtime User
Hi all,
First time user/poster here... Just playing at the moment.
Started with TabHost sample.
Changed the first tab to host a GPS/MapView , this worked great.

But when I try and host a camera preview on the second tab the GPS/map viewer no longer works ?

The third tab now draws a F1 - like accelerometer, and this does work concurrently with the GPS/MapView.

So my question is this, does the camera preview consitiute a second activity which stops/pauses the GPS system ?

Thanks for any help..
paul.
 

PaulF

New Member
Licensed User
Longtime User
can now get the opposite

B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("main")
   Dim bmp1, bmp2 As Bitmap
   bmp1 = LoadBitmap(File.DirAssets, "ic.png")
   bmp2 = LoadBitmap(File.DirAssets, "ic_selected.png")
   
   TabHost1.AddTab("Video",   "video")
   TabHost1.AddTab("GPS",      "map")
   TabHost1.AddTab("Accel"  ,   "accel")

   
   If FirstTime Then
 
      Dim ps As PhoneSensors 'This object is only used to access the type constants.
      GSensor.Initialize(ps.TYPE_ACCELEROMETER)
      lblSatellites.TextColor = Colors.Black
      simpleCamera.Initialize(videoHolder,"camera")
      GPS1.Initialize("MyGPS")
   End If

If I change the order of simplecamera.Initialize with GPS1.Initialize etc etc the last one works.
Is it possible to get both Or more to run together ?
 
Upvote 0

PaulF

New Member
Licensed User
Longtime User
So i'm trying to get concurrent camera feed and gps feed , without success. Is this even possible on android ?
I've attached the export zip , if anyone could help.
 

Attachments

  • gpsAndCamera.zip
    12.8 KB · Views: 236
Upvote 0

PaulF

New Member
Licensed User
Longtime User
Thanks for taking a look. I'm running on a OSF (ZTE Blade) , flashed with Swedish snow RLS3 , a 2.3.5 rom. 2.6.35.7-perf+zte-kernel
 
Last edited:
Upvote 0
Top