Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70854 articles
Browse latest View live

Document scanner for Ionic


Is it legal to use Paypal instead of InAppPurchase?

$
0
0

@matanyed wrote:

I have diets app, and to use the app you need to purchase 30 days diet plan.
Is it legal to use Paypal to purchase it?
I heard from friend that I have to use InAppPurchase in order to be legal app in Play Market or AppStore.

What is the correct anwser?

Posts: 1

Participants: 1

Read full topic

Unable to read file from mounted sd card directory through $cordovaFile

$
0
0

@krishna2112 wrote:

i have a code similar to this

$cordovaFile.readAsText(cordova.file.externalRootDirectory, "file.txt")
  .then(function (success) {

  }, function (error) {

  });

which according to offical docs should read file from mounted sd card but this is reading file from internal storage

Posts: 1

Participants: 1

Read full topic

Ionic Io App_id undefined

$
0
0

@johanjjonsson wrote:

Started up my project today and tried to build it via ionic package - but it complains
´"Missing Ionic App ID. (CLI v2.0.0-beta.37)"´
Okay so I started a new project and it returned the same response there. Ionic io init returned that it works but when I look in the .io-config.json file it is defenitly not working - {"app_id":"undefined"}
Any ideas? Tried to set the app_id and than build it and the result is the same. Have even tried another computer.

Posts: 1

Participants: 1

Read full topic

You cannot run this command unless you are in an Ionic Project folder

$
0
0

@satgua wrote:

Hi,

After creating new ionic project "ionic start myApp blank", All of sudden i've started getting below message:

"You cannot run this command unless you are in an Ionic Project folder"

I can see newly created project is also missing ionic.project file.

I had recently upgrade ionic version to 2.

Please suggest.

Posts: 2

Participants: 2

Read full topic

Issue with Facebook Connect and Firebase

$
0
0

@Walltoo wrote:

Hi,

I tried for weeks to implement the facebook login with firebase and my apps but the problem is it work with my browser but not with my iPhone.

I use the Facebook Javascript SDK and the firebase.auth().signInWithCredential(credential)

and it work very well with my browser but nothing on my device.

Can you help me with this problem?

Regards

Posts: 1

Participants: 1

Read full topic

Modify ion nav bar buttons from inside a ui-view

$
0
0

@pxdev wrote:

Hi everyone,

in our app we implemented our own split view using ui-view to load the right side pane. We implemented our own because the Ionic way of showing the side menu wasn't enough for us. This is how it looks like:

The problem is that the buttons specified in the right pane view aren't added to the header bar since that view isn't the root ion-view, it's inside a ui-view.

This is how the DOM looks like with our split view:

<ion-nav-view>
  <ion-view> <!-- Left pane ion-view -->
    <mm-split-view> <!-- Our directive -->
      <div class="mm-split-pane-menu"> <!-- Left pane items -->
      <div ui-view="mmaMessagesIndex"> <!-- Right pane container, ui-view -->
        <ion-view> <!-- Right pane ion-view -->
          <ion-nav-buttons> <!-- These buttons aren't shown -->

I looked at the ionNavButtons directive and I saw that it looks for the parent ionView, and in this case it isn't the root ionView. So I decided to create my own directive similar to ionNavButtons, but using the outer ion-view instead of the parent one.

This had some problems too, since this relies on beforeEnter and afterEvent events, and when my right side view is loaded the events of the outer view are already fired. So I decided to trigger it myself:

parentViewCtrl.beforeEnter(undefined, {transitionId: transitionId});

With this I managed to make it work the first time I open the view. But if I go to a subview (let's call it view B) and then come back, the header bar shown is the one from the subview (view B), not the one I want (view A). The same happens if I use the side menu to go to another view (view C) and then come back to view A, the header seen is the one from view C.

Anybody knows how to make the header bar update when going back to the view?

I know my solution is pretty hacky and I guess no one will know how to help me, but I'd appreciate any advice on how to make something like this work.

Some useful links:

Directive I created based on ionNavButtons.

Split view directive.

Thank you!

Posts: 1

Participants: 1

Read full topic

Landscape mode in the Ionic view app

$
0
0

@thecodelab wrote:

I was wondering if the view app support's landscape mode?
My app is a landscape only app but the Ionic view app shows it in portrait.

I used:

<preference name="orientation" value="landscape"/>

Turning the device wont work either.

Thx!

Posts: 1

Participants: 1

Read full topic


Ionic Android pairing with Bluetooth without PIN

$
0
0

@santosh wrote:

I am working with bluetooth module. I have a Ionic app that uses the Bluetooth Serial plugin and I can connect to the bluetooth module successfully, however I want to be able to remove the pop up that appears asking the user to enter the PIN to pair my Android to the Bluetooth module. I know this can be done using native SDK, example here and here. But not sure how I would go about it using Ionic.

Posts: 1

Participants: 1

Read full topic

Option when push outline button

$
0
0

@Jose_Ionic wrote:

Hello! I have this button:

Button 1

When I push the button automatically the background changes to white and my letters changes to black. How can I modify this options? For example, when I push the button that background changes to green and letters changes to red.
Thanks in advance.

Best regards.

Posts: 2

Participants: 2

Read full topic

Ionic 2, download PDF with request POST

$
0
0

@antony110994 wrote:

my goal is to send a POST request with data in his body and receive a PDF file to be saved and then to open. I created two functions to do this thing with different approaches but both give me problems .
1)

prova(){

  let link = 'http://www.istruzione.it/esame_di_stato/201516/Italiano/Ordinaria/P000_ORD16.pdf';
  let dir: string;
  if(this.platform.is('android')){
      dir = cordova.file.externalDataDirectory;
  }
  if(this.platform.is('ios')){
      dir = cordova.file.dataDirectory;
  }
  alert(dir);
  let data = {
      nome: "antonio",
      cognome: "amodeo"
  };
  let options = {
      params: data
  };
  let fileTransfer = new Transfer();
  fileTransfer.download(link, dir + 'abc.pdf', true, options).then((fileEntry) => alert("okey"));
  this.platform.ready().then(() => {
      cordova.plugins.fileOpener2.open(
      dir + "/abc.pdf",
      'application/pdf',
      {
          error : function(e) {
              console.log('Error status: ' + e.status + ' - Error message: ' + e.message);
          },
          success : function () {
              console.log('file opened successfully');
          }
      }
      );
  });

}

This first solution makes me download the pdf file and open it but also does a POST request but a normal GET .

2)

prova2(){

  let link = 'http://www.istruzione.it/esame_di_stato/201516/Italiano/Ordinaria/P000_ORD16.pdf';
  let date = {
      nome: "antonio",
      cognome: "amodeo"
  };
  this.http.post(link,date).subscribe(data => {
      alert(cordova.file.externalDataDirectory);
      File.createFile(cordova.file.externalDataDirectory, 'abc.pdf', true).then((fileEntry) => {
          fileEntry.createWriter((fileWriter) => {
              fileWriter.onwriteend = () => {
                  alert('File writer - write end event fired...');
              };
              fileWriter.onerror = (e) => {
                  alert('file writer - error event fired: ' + e.toString());
              };
              fileWriter.write(data.text());
              this.platform.ready().then(() => {
                  cordova.plugins.fileOpener2.open(
                  cordova.file.externalDataDirectory + "/abc.pdf",
                  'application/pdf',
                  {
                      error : function(e) {
                          console.log('Error status: ' + e.status + ' - Error message: ' + e.message);
                      },
                      success : function () {
                          console.log('file opened successfully');
                      }
                  }
                  );
                });
              });
          });
      });

}

the second solution sends the POST request with the right data, but the downloaded file when opened it has the right number of pages but are in white. In your opinion how could I do?

Posts: 1

Participants: 1

Read full topic

Making Ajax calls

$
0
0

@daviddupuy wrote:

Hi there,

I'm trying to do something that should be quite basic regarding the ionic/cordova mechanism, making http requests from my Android device.
It is just failed whatever I've tried...I guess due to the CORS.

I've got all the required permissions in the config.xml file and in the AndroidManifest.xml file.

I've set up a proxy thanks to ionic CLI in the ionic.config.json file.
"proxies": [{
"path": "/api/login",
"proxyUrl": "http://my-example.api.com"
}]

I'm using the Angular $http to make my requests.
$http({
method : "POST",
data : JSON.stringify(loginData),
dataType: 'json',
contentType: 'text/plain',
crossDomain: true,
url : "/api/login",
}).then(function mySucces(response) {
alert('SUCCESS');
}, function myError(data) {
alert("FAIL");
});

I've tried various header in the index.html...here's the latest

I'm running out of ideas.
For info, I don't have access to the Server API to make any changes.

Am I missing something ? Am I doing anything wrong ?

Thx

Posts: 3

Participants: 2

Read full topic

How to set image as background?

$
0
0

@petersenyszyn wrote:

Hi there,

I'm having issues setting an image as the background for my login page. I've looked around the web for potential solutions, but nothing has worked so far. In my login.html file I have this:

<ion-content class="login-background"> ... </ion-content>

And in my app.core.scss:

@import "../pages/login/login";

.login-background {
  background-image: url("img/background.jpg") no-repeat fixed center;
  background-size: cover;
}

My image is located at www/img/background.jpg, which I believe is the correct place to put it. If anyone has any ideas as to how to make the image show, I'd really appreciate it.

Thanks!

Posts: 6

Participants: 2

Read full topic

Ionic start newapp --v2 without typescript

$
0
0

@MisterDev wrote:

I'm creating a new app using ionic start myapp --v2 without the --ts flag but I'm still getting .ts files.
Same thing happens in 2.0.0-beta.23 and 2.0.0-beta.37

What am I missing? How can I generate my .js files?

Posts: 2

Participants: 2

Read full topic

Http Get Array From Server

$
0
0

@phil_co wrote:

Hello I want to be able to filter the "name" of my array for autocomplete. However I can only get "records".

this.http.get('http://www.example.com/file.php')
        .subscribe(data => {
this.items=JSON.parse(data.text()).records;
        });

My array:

{ "records":[ {"id":"1","name":"Bart"},{"id":"2","name":"Lisa"} ]}

Posts: 1

Participants: 1

Read full topic


Control via custom directive show of div in template

$
0
0

@William_Wallace wrote:

Hello together,
I like to do some "strange" things. Maybe. Not sure there is any better way. I try to describe it as short as possible.

I am using the videogular-player and the vg-quality plugin. Via the plugin the user can control the video-quality, but I had to customize the directive in some way.

So far so good, now I like to show some loading-spinner when the user change quality and it looks like I am getting crazy with that thing.

My idea was to set an scope-variable in the directive to true or false and in the template I have an div with ng-show and that variable. But it is not as easy as that, because I cannot manipulate the scope-variable in the template.

Some code for better understanding:

In the Template we got this here:

<div ng-show="loading" class="spinner"></div>

So, I like to set this $scope.loading in my directive, in the controller I have access to it, but not in the vg-quality-directive.

Code for the directive in the template:

<vg-quality quality-sources="controller.config.qualitySources" default-quality="controller.currentQualitySource"></vg-quality>

So yeah, that's just the basic stuff and I have no idea how to get the loading-scope to my directive. I know that normally the directive have their own scopes, but I already hear about the two way data binding between controller and directive, but I don't get it work.

Maybe the other thing is, that inside vg-quality there is another directive vg-quality-selector, and that directive contains the function which should manipulate the loading-scope.

Hope I didn't describe the problem too bad. The code to vg-quality can be seen here:
https://github.com/noppolp/videogular-quality

Thanks for any help. I am quite sure that I am just move in a circle and the solution is really simple....

Edit: Another really simple idea was to manipulate the DOM in the directive. But I think that is like give the framework a bullet.

Posts: 1

Participants: 1

Read full topic

Header inside an image

Ng-click does not fire immediately

$
0
0

@fouadkajj wrote:

    <div class="col-33">
      <a ng-click="leavingMenuPage()" href="#/app/interview" >
        <i class="icon ion-android-person"></i>
        <p class="pFont" >Görüşme</p>
      </a>
    </div>
    <div class="col-33">
      <a ng-click="leavingMenuPage()"  href="#/app/appointment" >
        <i class="icon ion-android-people"></i>
        <p class="pFont">Randevular</p>
      </a>
    </div>

    <div  class="col-33">
      <a  href="#/app/consumers" >
        <i class="icon ion-android-car "></i>
        <p class="pFont">Müşteriler</p>
      </a>
    </div>

When i click on the first icon , ng-click does not fire immediately .
I have to wait for one second before it fired ..
The page "#/app/interview" has an api connection so i defined the following function to start ionicLoading when i click on button :

$scope.leavingMenuPage = function(){
$ionicLoading.show({
template: 'Lütfen Bekleyiniz ...'
});
}

This ionicLoading will be hidden ionicView.afterEnter of the page '#/app/interview' .

other icons has normal behavior and when clicking on them i can go immediately to the href without any waiting (because they don't have any connection or something like that ) .

My question how to make ionicLoading shown IMMEDIATELY when pressing on the icon that responsible to fire it ???

I hope that my English was enough to explain :slight_smile:

Posts: 1

Participants: 1

Read full topic

Back button disappearing on tab views

$
0
0

@jasonw749 wrote:

Hi there,

I have a quite strange issue that I wondered if anyone could help me with.

I have a tab view with 5 tabs, if i perform a series of view changes, the back button randomly disappears.

The issue also happens on this codepen. https://codepen.io/ionic/pen/VLwLOG

If you perform the following steps, it can be reproduced
tab 1 -> subview -> back
tab 2 -> subview -> back
tab 1 -> subview -> back
tab 2 -> subview

On this subview, there is no back button.

Any help is appreciated.

Posts: 1

Participants: 1

Read full topic

About LocalNotifications in Ionic-Native

$
0
0

@Palaniappan wrote:

Hi, I have a basic question, when i try to use the local notification from ionic native, i couldn't retrieve the promise from the LocalNotification.schedule() function.
Is this a wrapper function to the existing cordova plugin or is it different. Since from the ngCordova documentation which i used on ionic1, i see a promise / a return function from functions like schedule, but when i was checking for a promise in my current project TS file, it just reported ""Error TS2339: Property 'then' does not exist on type 'void'.""
When i remove the then function my notifications are getting triggered. But not sure what's happening here.

This is what i was trying to do (TS):

LocalNotifications.schedule({
id:notificationId,
at: alarmTime,
text:"Time to checkout",
title:"Hello there!!!",
icon:'/img/img.png'
}).then((result) => {
console.log("result from notification:",result);
});

Similar to this existing wrapper from ngCordova:
$cordovaLocalNotification.schedule({
id: 1,
title: 'Title here',
text: 'Text here',
at: _10SecondsFromNow
}).then(function (result) {
// ...
});
Thanks
Suresh

Posts: 1

Participants: 1

Read full topic

Viewing all 70854 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>