IP Cam Viewer     My Amazon IP Cameras    

launching app with task managers and other automation apps

Support for my free Android Applications.

launching app with task managers and other automation apps

Postby N4Spd » Sat Apr 09, 2011 3:28 pm

Use the following sample code to launch my app in different ways.
It can also help you figure out how to launch my app using task/app automation tools/apps.

ps. see this post for more integration options via built-in web server.

Code: Select all
// launch matrix mode of paid version
       Intent intent = new Intent( Intent.ACTION_MAIN );
        intent.addCategory( Intent.CATEGORY_LAUNCHER );
        intent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
       ComponentName cn = new ComponentName( "com.rcreations.WebCamViewerPaid", "com.rcreations.WebCamViewerPaid.IpCamViewerActivity" );
        intent.setComponent( cn );
        intent.putExtra( "selectView", "MATRIX_VIEW" );
        startActivity( intent );

// launch matrix mode of paid version for specific group name (v5.2.5 or newer)
       Intent intent = new Intent( Intent.ACTION_MAIN );
        intent.addCategory( Intent.CATEGORY_LAUNCHER );
        intent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
       ComponentName cn = new ComponentName( "com.rcreations.WebCamViewerPaid", "com.rcreations.WebCamViewerPaid.IpCamViewerActivity" );
        intent.setComponent( cn );
        intent.putExtra( "selectView", "MATRIX_VIEW" );
        intent.putExtra( "selectGroupName", "group name" );
        startActivity( intent );

// launch gallery mode of paid version
       Intent intent = new Intent( Intent.ACTION_MAIN );
        intent.addCategory( Intent.CATEGORY_LAUNCHER );
        intent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
       ComponentName cn = new ComponentName( "com.rcreations.WebCamViewerPaid", "com.rcreations.WebCamViewerPaid.IpCamViewerActivity" );
        intent.setComponent( cn );
        intent.putExtra( "selectView", "GALLERY_VIEW" );
        startActivity( intent );

// launch gallery mode of paid version for specific camera
       Intent intent = new Intent( Intent.ACTION_MAIN );
        intent.addCategory( Intent.CATEGORY_LAUNCHER );
        intent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
       ComponentName cn = new ComponentName( "com.rcreations.WebCamViewerPaid", "com.rcreations.WebCamViewerPaid.IpCamViewerActivity" );
        intent.setComponent( cn );
        intent.putExtra( "selectView", "GALLERY_VIEW" );
        intent.putExtra( "selectCameraName", "my cam name" );
        startActivity( intent );

// for the Lite version of the app, use the following ComponentName:
       ComponentName cn = new ComponentName( "com.rcreations.ipcamviewer", "com.rcreations.ipcamviewer.WebCamViewerActivity" );

// for the Basic version of the app, use the following ComponentName:
       ComponentName cn = new ComponentName( "com.rcreations.ipcamviewerBasic", "com.rcreations.ipcamviewerBasic.WebCamViewerActivity" );
N4Spd
 
Posts: 1369
Joined: Sun Feb 08, 2009 3:25 pm

Re: launching app with task managers and other automation apps

Postby scoutx » Mon Apr 18, 2011 7:58 am

Thanks Rob - going to see what I can do with Tasker on this and some automation.
User avatar
scoutx
 
Posts: 4
Joined: Sat Feb 05, 2011 7:23 am

Re: launching app with task managers and other automation apps

Postby calistra » Tue Aug 14, 2012 9:30 pm

When I execute this code I get an
ActivityNotFoundException
Unable to find explicit activity class {com.rcreations.ipcamviewerFree/com.rcreations.ipcamviewer.WebCamViewerActivity}
have you declared this activity in your Android Manifest?

which suggests that the intent should be put into the manifest.

can you suggest the relevant lines that I need to put in the manifest?

---- code ----
Code: Select all
   int camera_handler = CAM_FREE_APP;
   Intent intent;         
   ComponentName cn;
   if (camera_handler ==CAM_FREE_APP) {
      cn = new ComponentName( "com.rcreations.ipcamviewerFree", "com.rcreations.ipcamviewer.WebCamViewerActivity" );
      camera_handler = CAM_PAID_GALLERY; // just force it to one of the paid options...
   } else {
      cn = new ComponentName( "com.rcreations.WebCamViewerPaid", "com.rcreations.WebCamViewerPaid.IpCamViewerActivity" );
   }

------ this is inside a switch - rest omitted

Code: Select all
   // launch gallery mode of paid / free version
        intent = new Intent( Intent.ACTION_MAIN );
   intent.addCategory( Intent.CATEGORY_LAUNCHER );
   intent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
   intent.setComponent( cn );
   intent.putExtra( "selectView", "GALLERY_VIEW" );
   startActivity( intent );
-----
calistra
 
Posts: 1
Joined: Tue Aug 14, 2012 9:02 pm

Re: launching app with task managers and other automation apps

Postby stbi » Mon Apr 01, 2013 9:54 am

Was anyone able to configure this in Tasker?

I hadn't been successful in my attempts so far. The app is opened, but the camera is not selected.

What I did is shown in the attached screenshots.

Any ideas?
Attachments
TaskerSendIntent.png
TaskerSendIntent.png (58.07 KiB) Viewed 18643 times
stbi
 
Posts: 5
Joined: Sat Mar 17, 2012 10:39 am

Re: launching app with task managers and other automation apps

Postby Javier » Sat Jan 18, 2014 12:51 pm

Has anyone figured out a way to do this in tasker or is there a way to create camera shortcuts(which can be opened by tasker)?
Thanks,
Javier
Last edited by Javier on Tue Jan 21, 2014 6:46 pm, edited 1 time in total.
Javier
 
Posts: 4
Joined: Sat Jan 11, 2014 1:29 pm


Re: launching app with task managers and other automation apps

Postby iostream212 » Wed Jan 29, 2014 6:00 pm

Change ACTION to:
Code: Select all
android.intent.action.MAIN

CAT is correct as 'launcher'
Mime: Empty
Data: Empty
Extra: specify here for gallery or matrix view either
Code: Select all
selectView:GALLERY_VIEW
or
Code: Select all
selectView:MATRIX_VIEW

Extra: specify camera for gallery view:
Code: Select all
selectCameraName:EnterCameraName

Package is correct
Leave CLASS Empty.
iostream212
 
Posts: 1
Joined: Mon Jan 27, 2014 7:26 am

Re: launching app with task managers and other automation apps

Postby fraschizzato » Mon Feb 10, 2014 9:37 pm

Is it possible with tasker (or other app) to enter direclty in record mode on?
fraschizzato
 
Posts: 5
Joined: Tue Apr 03, 2012 2:16 am

Re: launching app with task managers and other automation apps

Postby Javier » Tue Mar 04, 2014 7:17 am

iostream212 wrote:Change ACTION to:
Code: Select all
android.intent.action.MAIN

CAT is correct as 'launcher'
Mime: Empty
Data: Empty
Extra: specify here for gallery or matrix view either
Code: Select all
selectView:GALLERY_VIEW
or
Code: Select all
selectView:MATRIX_VIEW

Extra: specify camera for gallery view:
Code: Select all
selectCameraName:EnterCameraName

Package is correct
Leave CLASS Empty.


Thank You iostream212!

Just in case anyone else is using this you also have to add the Group Name to the "Extra" after Matrix_View for it to work (If not setup I think it is "All")
Code: Select all
selectGroupName:Group_Name
Javier
 
Posts: 4
Joined: Sat Jan 11, 2014 1:29 pm

Re: launching app with task managers and other automation apps

Postby spoteat » Mon Apr 21, 2014 12:21 pm

Has anyone gotten this to work? I have been unsuccessful in my attempts.
spoteat
 
Posts: 3
Joined: Fri Apr 27, 2012 9:31 am

Next

Return to Support

Who is online

Users browsing this forum: Google [Bot] and 7 guests